diff --git a/.github/workflows/publish-platform.yml b/.github/workflows/publish-platform.yml index 5f7235e5f..5d95c494a 100644 --- a/.github/workflows/publish-platform.yml +++ b/.github/workflows/publish-platform.yml @@ -342,17 +342,20 @@ jobs: ls -la packages/${PLATFORM}/ ls -la packages/${PLATFORM}/bin/ - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v6 if: steps.check.outputs.skip_all != 'true' && steps.download.outcome == 'success' with: node-version: "24" registry-url: "https://registry.npmjs.org" + - name: Upgrade npm for trusted publishing (>=11.5.1) + if: steps.check.outputs.skip_all != 'true' && steps.download.outcome == 'success' + run: npm install -g npm@latest + - name: Publish oh-my-opencode-${{ matrix.platform }} if: steps.check.outputs.skip_opencode != 'true' && steps.download.outcome == 'success' env: DIST_TAG: ${{ steps.validate.outputs.dist_tag }} - NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} NPM_CONFIG_PROVENANCE: true run: | cd packages/${{ matrix.platform }} @@ -368,7 +371,6 @@ jobs: if: steps.check.outputs.skip_openagent != 'true' && steps.download.outcome == 'success' env: DIST_TAG: ${{ steps.validate.outputs.dist_tag }} - NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} NPM_CONFIG_PROVENANCE: true run: | cd packages/${{ matrix.platform }} diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 7415257a3..d53da6f1f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -83,11 +83,14 @@ jobs: with: bun-version: "1.3.11" - - uses: actions/setup-node@v4 + - uses: actions/setup-node@v6 with: node-version: "24" registry-url: "https://registry.npmjs.org" + - name: Upgrade npm for trusted publishing (>=11.5.1) + run: npm install -g npm@latest + - name: Install dependencies run: bun install env: @@ -170,7 +173,6 @@ jobs: if: steps.check.outputs.skip != 'true' env: DIST_TAG: ${{ steps.version.outputs.dist_tag }} - NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} NPM_CONFIG_PROVENANCE: true run: | if [ -n "$DIST_TAG" ]; then @@ -197,7 +199,6 @@ jobs: env: VERSION: ${{ steps.version.outputs.version }} DIST_TAG: ${{ steps.version.outputs.dist_tag }} - NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} NPM_CONFIG_PROVENANCE: true run: | # Update package name, version, and optionalDependencies for oh-my-openagent