Skip to content

Commit cb4bb4e

Browse files
committed
Fix release version detection
1 parent 4594fce commit cb4bb4e

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

.github/workflows/release.yml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,9 +24,8 @@ jobs:
2424
with:
2525
path: ~/.npm
2626
key: ${{ runner.os }}-node-${{ hashFiles('**/package.json') }}
27-
# Store the name of the release
28-
# See https://stackoverflow.com/questions/58177786/get-the-current-pushed-tag-in-github-actions
29-
- run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
27+
- run: echo "RELEASE_VERSION=${{ github.event.release.tag_name }}" >> $GITHUB_ENV
28+
- run: test -n "$RELEASE_VERSION"
3029
- run: npm i
3130
- run: npm version $RELEASE_VERSION --no-git-tag-version
3231
- run: npm publish --access public

0 commit comments

Comments
 (0)