From 1f9b2f3394cfaaaeef16b3cbd6fae0fb6cc950fa Mon Sep 17 00:00:00 2001 From: Jason Roy Date: Tue, 27 Oct 2026 14:40:36 -0700 Subject: [PATCH] ci: record npm publishes on the Deployments page The publish job now runs in an "npm" environment whose URL is the published version on npmjs.com, so each release shows up under the repo's Deployments. The environment has no protection rules, so the automated publish is not gated. npm trusted publishing is unaffected: it already publishes without an environment, so the trusted publisher config does not pin one. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/publish.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c5ab08a..0d77f0e 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -20,9 +20,11 @@ on: jobs: publish: runs-on: ubuntu-24.04 - # Note: For full automation, we've removed the environment approval requirement - # If you want manual approval, uncomment the next line and configure the "publish" environment in GitHub - # environment: publish + # Records each publish on the repo's Deployments page, linked to the version on npm. The + # environment has no protection rules, so it does not gate the automated publish. + environment: + name: npm + url: https://www.npmjs.com/package/@mrjasonroy/cache-components-cache-handler/v/${{ steps.dist_tag.outputs.version }} permissions: contents: write # Required for creating releases id-token: write # Required for npm provenance and trusted publishing @@ -84,6 +86,7 @@ jobs: id: dist_tag run: | VERSION=$(node -p "require('./packages/cache-handler/package.json').version") + echo "version=$VERSION" >> $GITHUB_OUTPUT if [[ "$VERSION" == *"-alpha"* ]]; then echo "tag=alpha" >> $GITHUB_OUTPUT elif [[ "$VERSION" == *"-beta"* ]]; then