-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #82 from hookdeck/chore/ci-tag-version
chore(CI): update how tag version is stored and accessed
- Loading branch information
Showing
1 changed file
with
4 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -112,23 +112,24 @@ jobs: | |
|
||
- name: Get GitHub tag version | ||
# Store the version, stripping any v-prefix | ||
id: tag-version | ||
run: | | ||
TAG_VERSION=${GITHUB_REF_NAME#v} | ||
echo Version: $TAG_VERSION | ||
echo "TAG_VERSION=$TAG_VERSION" >> $GITHUB_ENV | ||
echo "TAG_VERSION=$TAG_VERSION" >> $GITHUB_OUTPUT | ||
- name: Update package.json version | ||
uses: jossef/[email protected] | ||
with: | ||
file: package.json | ||
field: version | ||
value: ${TAG_VERSION} | ||
value: ${{ steps.tag-version.outputs.TAG_VERSION }} | ||
|
||
- name: Commit package.json version | ||
uses: EndBug/add-and-commit@v9 | ||
with: | ||
default_author: github_actions | ||
message: 'Update package.json version to ${TAG_VERSION}' | ||
message: 'Update package.json version to ${{ steps.tag-version.outputs.TAG_VERSION }}' | ||
add: 'package.json' | ||
|
||
- run: npm ci | ||
|