publish executor v1.5.32 #202
Workflow file for this run
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 Executor | |
| run-name: "${{ format('publish executor {0}', github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name) }}" | |
| on: | |
| # Release pushes a validated v* tag and lets this trigger handle automatic | |
| # publishing. workflow_dispatch stays available for explicit repair runs. | |
| push: | |
| tags: | |
| - "v*" | |
| workflow_dispatch: | |
| inputs: | |
| tag: | |
| description: Git tag to publish | |
| required: true | |
| type: string | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: publish-executor-package-${{ github.ref }} | |
| cancel-in-progress: false | |
| jobs: | |
| publish: | |
| runs-on: ubuntu-latest | |
| permissions: | |
| actions: write | |
| contents: write | |
| id-token: write | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - name: Setup Bun | |
| uses: oven-sh/setup-bun@v2 | |
| with: | |
| bun-version: 1.3.11 | |
| - name: Validate release tag | |
| env: | |
| RAW_RELEASE_TAG: ${{ github.event_name == 'workflow_dispatch' && inputs.tag || github.ref_name }} | |
| run: bun run scripts/validate-release-ref.ts --tag-env RAW_RELEASE_TAG --write-env RELEASE_TAG | |
| - name: Checkout release tag | |
| env: | |
| GH_TOKEN: ${{ secrets.RELEASE_PAT || github.token }} | |
| run: | | |
| auth_remote="https://x-access-token:${GH_TOKEN}@github.com/${GITHUB_REPOSITORY}.git" | |
| git fetch --force --tags "$auth_remote" "refs/tags/$RELEASE_TAG:refs/tags/$RELEASE_TAG" | |
| git checkout --detach "$RELEASE_TAG" | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 24 | |
| registry-url: https://registry.npmjs.org | |
| - name: Update npm for trusted publishing | |
| run: | | |
| # npm 12.0.0 fails `publish --provenance` with "Cannot find module | |
| # 'sigstore'" (npm/cli#9722); 11.x supports trusted publishing and works. | |
| npm install -g npm@11 | |
| npm --version | |
| - name: Install dependencies | |
| run: bun install --frozen-lockfile | |
| - name: Run release checks | |
| run: bun run release:check | |
| - name: Publish package and create release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: | | |
| export GITHUB_REF_TYPE=tag | |
| export GITHUB_REF_NAME="$RELEASE_TAG" | |
| export GITHUB_REF="refs/tags/$RELEASE_TAG" | |
| bun run release:publish | |
| - name: Trigger desktop build | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: gh workflow run publish-desktop.yml -f tag="$RELEASE_TAG" | |
| - name: Trigger self-host Docker publish | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| run: gh workflow run publish-selfhost-docker.yml -f tag="$RELEASE_TAG" |