Publish a Release #24
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
| # TODO move this run to buildkite | |
| name: Publish a Release | |
| on: | |
| workflow_dispatch | |
| permissions: | |
| contents: read # for checkout | |
| env: | |
| ECH_NODE_VERSION: '22.22.0' | |
| jobs: | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: write # to be able to publish a GitHub release | |
| issues: write # to be able to comment on released issues | |
| pull-requests: write # to be able to comment on released pull requests | |
| id-token: write # to enable use of OIDC for trusted publishing and npm provenance | |
| steps: | |
| - name: Check out repository | |
| uses: actions/checkout@v6.0.2 | |
| with: | |
| persist-credentials: false | |
| fetch-depth: 0 | |
| - name: Fetch all tags | |
| run: git fetch --force --tags origin | |
| - name: Setup node | |
| uses: actions/setup-node@v6.4.0 | |
| with: | |
| node-version: ${{ env.ECH_NODE_VERSION }} | |
| - name: Install node_modules | |
| uses: bahmutov/npm-install@v1.12.1 | |
| with: | |
| useRollingCache: true | |
| - name: Build library | |
| run: yarn build | |
| - name: Upgrade npm for trusted publishing (OIDC) support | |
| run: npm install -g npm@11.5.1 | |
| - name: Release | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.ADMIN_TOKEN_GH }} | |
| SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} | |
| run: yarn semantic-release |