Skip to content

Commit 16fe237

Browse files
authored
chore(CI): update how tag version is stored and accessed
1 parent 10f0ad3 commit 16fe237

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -112,23 +112,24 @@ jobs:
112112

113113
- name: Get GitHub tag version
114114
# Store the version, stripping any v-prefix
115+
id: tag-version
115116
run: |
116117
TAG_VERSION=${GITHUB_REF_NAME#v}
117118
echo Version: $TAG_VERSION
118-
echo "TAG_VERSION=$TAG_VERSION" >> $GITHUB_ENV
119+
echo "TAG_VERSION=$TAG_VERSION" >> $GITHUB_OUTPUT
119120
120121
- name: Update package.json version
121122
uses: jossef/[email protected]
122123
with:
123124
file: package.json
124125
field: version
125-
value: ${TAG_VERSION}
126+
value: ${{ steps.tag-version.outputs.TAG_VERSION }}
126127

127128
- name: Commit package.json version
128129
uses: EndBug/add-and-commit@v9
129130
with:
130131
default_author: github_actions
131-
message: 'Update package.json version to ${TAG_VERSION}'
132+
message: 'Update package.json version to ${{ steps.tag-version.outputs.TAG_VERSION }}'
132133
add: 'package.json'
133134

134135
- run: npm ci

0 commit comments

Comments
 (0)