Merge pull request #65 from qualcomm/chore/cleanup #28
This file contains hidden or 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: "Publish Packages and Create Releases" | |
| env: | |
| IS_CI: true | |
| TURBO_API: "http://127.0.0.1:8585" | |
| TURBO_TEAM: "qualcomm-ui" | |
| TURBO_TOKEN: "turbo-cache-token" | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ main ] | |
| permissions: | |
| id-token: write | |
| contents: write | |
| jobs: | |
| check-versions: | |
| runs-on: ubuntu-latest | |
| concurrency: | |
| group: PR Check Versions - ${{github.head_ref}} | |
| cancel-in-progress: true | |
| timeout-minutes: 10 | |
| outputs: | |
| should-publish: ${{ steps.check.outputs.should-publish }} | |
| steps: | |
| - name: checkout | |
| uses: actions/checkout@v4 | |
| - uses: ./.github/actions/init-node-and-install | |
| - id: check | |
| run: pnpm tsx scripts/release/check-versions.ts | |
| - uses: ./.github/actions/init-remote-cache | |
| if: steps.check.outputs.should-publish == 'true' | |
| with: | |
| turborepo-remote-cache-bucket-name: ${{ secrets.TURBOREPO_REMOTE_CACHE_BUCKET_NAME }} | |
| turborepo-remote-cache-access-key: ${{ secrets.TURBOREPO_REMOTE_CACHE_ACCESS_KEY }} | |
| turborepo-remote-cache-secret-key: ${{ secrets.TURBOREPO_REMOTE_CACHE_SECRET_KEY }} | |
| - name: build | |
| if: steps.check.outputs.should-publish == 'true' | |
| run: pnpm run build | |
| - name: update npm | |
| if: steps.check.outputs.should-publish == 'true' | |
| run: | | |
| npm --version | |
| npm install -g npm@latest | |
| npm --version | |
| - name: publish | |
| if: steps.check.outputs.should-publish == 'true' | |
| run: pnpm publish:all | |
| - name: create releases | |
| if: steps.check.outputs.should-publish == 'true' | |
| run: pnpm tsx scripts/release/create-github-releases.ts | |
| env: | |
| TOKEN: ${{ secrets.GITHUB_TOKEN }} |