Release #14
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: Release | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| extension: | |
| description: Publish extension to testers | |
| type: boolean | |
| default: true | |
| push: | |
| branches: [main] | |
| concurrency: ${{ github.workflow }}-${{ github.ref }} | |
| jobs: | |
| snapshot: | |
| if: github.event_name == 'workflow_dispatch' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| registry-url: https://registry.npmjs.org | |
| - run: pnpm install --frozen-lockfile | |
| - name: Version packages (snapshot) | |
| run: pnpm changeset version --snapshot snapshot | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build | |
| run: pnpm build | |
| - name: Publish npm snapshots | |
| run: pnpm changeset publish --tag snapshot | |
| env: | |
| NPM_CONFIG_PROVENANCE: true | |
| - name: Zip extension | |
| if: inputs.extension | |
| working-directory: packages/devtools-extension | |
| run: cd dist && zip -r ../extension.zip . | |
| - name: Publish extension to testers | |
| if: inputs.extension | |
| uses: mnao305/chrome-extension-upload@v5.0.0 | |
| with: | |
| file-path: packages/devtools-extension/extension.zip | |
| extension-id: ${{ secrets.CHROME_EXTENSION_ID }} | |
| client-id: ${{ secrets.CHROME_CLIENT_ID }} | |
| client-secret: ${{ secrets.CHROME_CLIENT_SECRET }} | |
| refresh-token: ${{ secrets.CHROME_REFRESH_TOKEN }} | |
| publish: true | |
| publish-target: trustedTesters | |
| release: | |
| if: github.event_name == 'push' | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| id-token: write | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: pnpm/action-setup@v4 | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| cache: pnpm | |
| registry-url: https://registry.npmjs.org | |
| - run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm build | |
| - name: Create release PR or publish | |
| uses: changesets/action@v1 | |
| with: | |
| publish: pnpm release | |
| version: pnpm run version | |
| title: "chore: version packages" | |
| commit: "chore: version packages" | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| NPM_CONFIG_PROVENANCE: true |