From 27772ed6b30d276f848c00b56444b76c582e2742 Mon Sep 17 00:00:00 2001 From: John Gee Date: Tue, 20 Oct 2026 18:11:34 +1300 Subject: [PATCH] chore: update actions and stage publish - update actions - switch to staged publish with provenance --- .github/workflows/ci.yaml | 10 +++---- .github/workflows/release-please.yml | 42 ++++++++-------------------- 2 files changed, 16 insertions(+), 36 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 20147e39..486591e2 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,7 +13,7 @@ jobs: node: [20, 22] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: ${{ matrix.node }} - run: node --version @@ -26,7 +26,7 @@ jobs: runs-on: windows-latest steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: 22 - run: npm install @@ -37,7 +37,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: 22 - run: npm install @@ -49,7 +49,7 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: 22 - run: npm install @@ -67,7 +67,7 @@ jobs: node: [24] steps: - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: node-version: ${{ matrix.node }} - run: node --version diff --git a/.github/workflows/release-please.yml b/.github/workflows/release-please.yml index 737009bf..4d92ea73 100644 --- a/.github/workflows/release-please.yml +++ b/.github/workflows/release-please.yml @@ -1,14 +1,16 @@ on: - push: + push: branches: - master -permissions: - contents: write - issues: write - pull-requests: write + workflow_dispatch: name: release-please +permissions: {} jobs: release-please: + permissions: + contents: write # to create release commit (google-github-actions/release-please-action) + pull-requests: write # to create release PR (google-github-actions/release-please-action) + id-token: write # Required for OIDC runs-on: ubuntu-latest steps: - uses: googleapis/release-please-action@45996ed1f6d02564a971a2fa1b5860e934307cf7 # v5.0.0 @@ -16,36 +18,14 @@ jobs: with: token: ${{ secrets.GITHUB_TOKEN }} release-type: node - # package-name: cliui - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 - - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 + - uses: actions/setup-node@949feb2413d6458794dcd2491c4babbbce0c15c1 # v7.1.0 with: - node-version: 22 - - run: npm install + node-version: 24 + - run: npm ci env: PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true - run: npm run compile - # - name: push Deno release - # run: | - # git config user.name github-actions[bot] - # git config user.email 41898282+github-actions[bot]@users.noreply.github.com - # git remote add gh-token "https://${{ secrets.GITHUB_TOKEN}}@github.com/yargs/cliui.git" - # git checkout -b deno - # git add -f build - # git commit -a -m 'chore: ${{ steps.release.outputs.tag_name }} release' - # git push origin +deno - # git tag -a ${{ steps.release.outputs.tag_name }}-deno -m 'chore: ${{ steps.release.outputs.tag_name }} release' - # git push origin ${{ steps.release.outputs.tag_name }}-deno - # if: ${{ steps.release.outputs.release_created }} - - uses: actions/setup-node@820762786026740c76f36085b0efc47a31fe5020 # v7.0.0 - with: - node-version: 22 - registry-url: 'https://external-dot-oss-automation.appspot.com/' - if: ${{ steps.release.outputs.release_created }} - - run: npm install + - run: npm stage publish --provenance if: ${{ steps.release.outputs.release_created }} - # - run: npm publish - # env: - # NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}} - # if: ${{ steps.release.outputs.release_created }}