Skip to content
Merged
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
13 changes: 13 additions & 0 deletions .github/workflows/build-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,19 @@ jobs:
- name: Run tests
run: npm test

# Stamp package.json (and thus dist/package.json) with the release tag so
# the tarball version matches the GitHub release. Skip the floating
# `prerelease` alias tag — that is not a semver version.
- name: Set package version from release tag
if: github.event.release.tag_name != 'prerelease'
env:
RELEASE_TAG: ${{ github.event.release.tag_name }}
run: |
set -euo pipefail
version="${RELEASE_TAG}"
version="${version#v}"
npm version "$version" --no-git-tag-version --allow-same-version

- name: Pack release
run: npm run pack

Expand Down
Loading