From df707aef4c565f7d13e1c64516fec8a5a9d9da62 Mon Sep 17 00:00:00 2001 From: Aaron Date: Sun, 12 Oct 2025 22:02:37 -0500 Subject: [PATCH] ci: Use correct version of NPM that supports OIDC auth --- .github/workflows/release.yml | 62 ++++++++++++++--------------------- 1 file changed, 24 insertions(+), 38 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c177e96b..a0f1d772 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -24,10 +24,10 @@ permissions: contents: read jobs: - # validate: - # name: Validate - # uses: './.github/workflows/validate.yml' - # secrets: inherit + validate: + name: Validate + uses: './.github/workflows/validate.yml' + secrets: inherit publish: name: Publish @@ -35,8 +35,8 @@ jobs: permissions: contents: write # Push version changes id-token: write # OIDC for NPM publishing - # needs: - # - validate + needs: + - validate steps: - name: Checkout uses: actions/checkout@ff7abcd0c3c05ccf6adc123a8cd1fd4fb30fb493 # v5.0.0 @@ -47,39 +47,25 @@ jobs: - name: Setup uses: ./.github/actions/setup - - name: Update NPM - run: sudo npm i -g npm@latest - - - name: Which NPM + - name: Configure Git run: | - echo 'all' - which -a npm - echo 'selected' - which npm + git config user.name 'github-actions[bot]' + git config user.email 'github-actions[bot]@users.noreply.github.com' + git config --global push.followTags true - - name: Print NPM Version + - name: Bump and Tag run: | - npm --version - /usr/local/bin/npm --version + pnpm tsx scripts/bump-package-version.ts ${{ inputs.package }} + git push + git push --tags - # Disabled until the right version of NPM is installed - # - name: Configure Git - # run: | - # git config user.name 'github-actions[bot]' - # git config user.email 'github-actions[bot]@users.noreply.github.com' - # git config --global push.followTags true - # - # - name: Bump and Tag - # run: | - # pnpm tsx scripts/bump-package-version.ts ${{ inputs.package }} - # git push - # git push --tags - # - # - name: Publish to NPM - # working-directory: packages/${{ inputs.package }} - # run: npm publish - # - # - name: Create GitHub release - # run: pnpm tsx scripts/create-github-release.ts ${{ inputs.package }} - # env: - # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + - name: Publish to NPM + working-directory: packages/${{ inputs.package }} + run: | + sudo npm i -g npm@latest + /usr/local/bin/npm publish + + - name: Create GitHub release + run: pnpm tsx scripts/create-github-release.ts ${{ inputs.package }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}