From dad3a01a36b869c508a4cfc84ec0cc9dc1426f5f Mon Sep 17 00:00:00 2001 From: CharlieC3 <2747302+CharlieC3@users.noreply.github.com> Date: Fri, 14 Nov 2025 12:50:13 -0500 Subject: [PATCH] ci: support npm trusted publishers --- .github/workflows/ci.yml | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b9509dc..c66769f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,10 +17,10 @@ jobs: lint: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 - name: Use Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version-file: '.nvmrc' @@ -57,12 +57,12 @@ jobs: PGPASSWORD: postgres PGDATABASE: postgres steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: fetch-depth: 0 - name: Use Node.js - uses: actions/setup-node@v4 + uses: actions/setup-node@v6 with: node-version-file: '.nvmrc' @@ -94,7 +94,7 @@ jobs: run: npm run test -- --coverage - name: Upload coverage to Codecov - uses: codecov/codecov-action@v3 + uses: codecov/codecov-action@v5 - name: Print integration environment logs run: cat docker-compose-logs.txt @@ -107,6 +107,7 @@ jobs: build-publish: permissions: contents: write + id-token: write issues: write pull-requests: write runs-on: ubuntu-latest @@ -116,14 +117,13 @@ jobs: steps: - name: Generate release bot app token id: generate_token - uses: actions/create-github-app-token@v1 + uses: actions/create-github-app-token@v2 with: app-id: ${{ secrets.HIROSYSTEMS_RELEASE_BOT_ID }} private-key: ${{ secrets.HIROSYSTEMS_RELEASE_BOT_PEM }} - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: - token: ${{ secrets.GH_TOKEN || secrets.GITHUB_TOKEN }} fetch-depth: 0 persist-credentials: false - name: Get bot user ID @@ -133,7 +133,7 @@ jobs: env: GH_TOKEN: ${{ steps.generate_token.outputs.token }} - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v6 with: node-version-file: '.nvmrc' @@ -144,18 +144,16 @@ jobs: run: npm run build - name: Semantic Release - uses: cycjimmy/semantic-release-action@v4 + uses: cycjimmy/semantic-release-action@9cc899c47e6841430bbaedb43de1560a568dfd16 # v5 # Only run on non-PR events or only PRs that aren't from forks if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository env: GITHUB_TOKEN: ${{ steps.generate_token.outputs.token }} - NPM_TOKEN: ${{ secrets.NPM_TOKEN }} SEMANTIC_RELEASE_PACKAGE: ${{ github.event.repository.name }} GIT_AUTHOR_EMAIL: "${{ steps.bot-user-id.outputs.user-id }}+${{ steps.generate_token.outputs.app-slug }}[bot]@users.noreply.github.com" GIT_COMMITTER_EMAIL: "${{ steps.bot-user-id.outputs.user-id }}+${{ steps.generate_token.outputs.app-slug }}[bot]@users.noreply.github.com" with: - semantic_version: 19 extra_plugins: | @semantic-release/changelog@6.0.3 @semantic-release/git@10.0.1 - conventional-changelog-conventionalcommits@6.1.0 + conventional-changelog-conventionalcommits@9.1.0