Update the abstraction library code to use import type for interfaces #1614
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build and test all the Kiota packages | |
on: | |
workflow_dispatch: | |
push: | |
branches: [ main ] | |
pull_request: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
environment: | |
name: build_test | |
env: | |
TENANT_ID: ${{ secrets.TENANT_ID }} | |
strategy: | |
matrix: | |
node-version: [16.x, 18.x] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- run: .\scripts\updateVersion.ps1 | |
shell: pwsh | |
working-directory: ./ | |
- run: yarn install --frozen-lockfile --ignore-engines #spfx still not compatible with node 18 | |
- run: yarn global add [email protected] | |
- run: yarn run build | |
- name: Archive dist folders # archive dist folders to verify if they are transpiled correctly and available for publishing | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dist folders | |
path: | | |
packages/abstractions/dist | |
packages/serialization/form/dist | |
packages/serialization/json/dist | |
packages/serialization/multipart/dist | |
packages/serialization/text/dist | |
packages/http/fetch/dist | |
packages/authentication/azure/dist | |
- run: yarn lerna run test:integrated | |
if: ${{env.TENANT_ID != '' }} | |
env: | |
TENANT_ID: ${{secrets.tenant_id}} | |
CLIENT_ID: ${{secrets.client_id}} | |
CLIENT_SECRET: ${{secrets.client_secret}} | |
- run: yarn lerna run test --parallel | |
publish-npm: | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' && !contains(github.event.head_commit.message, 'auto dependabot')}} | |
needs: build | |
environment: | |
name: production_feed | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: https://registry.npmjs.org/ | |
- run: | | |
git config --global user.name '${GITHUB_ACTOR}' | |
git config --global user.email '${GITHUB_ACTOR}@users.noreply.github.com' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
GITHUB_ACTOR: ${{ secrets.GIT_USERNAME }} | |
- run: yarn install --frozen-lockfile --ignore-engines | |
- run: yarn run build | |
- run: lerna publish from-package --yes | |
env: | |
NODE_AUTH_TOKEN: ${{secrets.npm_token}} | |