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