Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,12 @@ jobs:
run: |
VERSION=$(echo "$TAG_NAME" | sed 's/^v//')
PACKAGE=$(node -p "require('./package.json').name")
npm dist-tag add "$PACKAGE@$VERSION" latest
echo "::notice title=Promoted $VERSION to latest::The latest tag now points to $VERSION (was edge-only)"
if npm view "$PACKAGE@$VERSION" version &>/dev/null; then
npm dist-tag add "$PACKAGE@$VERSION" latest
echo "::notice title=Promoted $VERSION to latest::The latest tag now points to $VERSION (was edge-only)"
else
echo "::notice title=Skipping promotion::Version $VERSION not yet published to npm, skipping dist-tag operation"
fi
env:
TAG_NAME: ${{ github.event.release.tag_name }}
NODE_AUTH_TOKEN: ${{secrets.NPM_DEPLOY_TOKEN}}
Expand Down
Loading