Skip to content

Commit 4294a5a

Browse files
author
Christian Paul
authored
Use environment variables for version and ref_name (#455)
* Use environment variables for version and ref_name * Add newsfile
1 parent a6be350 commit 4294a5a

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed

.github/workflows/docs.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ jobs:
3636
ref: gh-pages
3737

3838
# update the index file
39-
- run: node insert-new-version.js ${{ steps.package-version.outputs.current-version }}
39+
- env:
40+
CURRENT_VERSION: ${{ steps.package-version.outputs.current-version }}
41+
run: node insert-new-version.js "${CURRENT_VERSION}"
4042

4143
- name: Commit updated index
4244
uses: github-actions-x/[email protected]

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@ jobs:
99
- uses: actions/checkout@v3
1010
- name: Get changelog
1111
id: extract-changelog
12+
env:
13+
REF_NAME: ${{ github.ref_name }}
1214
run: |
1315
git fetch --tags --force
14-
RELEASE_NAME="${{ github.ref_name }} $(date +'%Y-%m-%d')"
15-
git tag -l --format='%(contents:body)' ${{ github.ref_name }} > next-changelog.txt
16+
RELEASE_NAME="${REF_NAME} $(date +'%Y-%m-%d')"
17+
git tag -l --format='%(contents:body)' "${REF_NAME}" > next-changelog.txt
1618
echo "RELEASE_NAME=$RELEASE_NAME" >> $GITHUB_OUTPUT
1719
- name: Create Release
1820
uses: softprops/action-gh-release@v1

changelog.d/455.misc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Use environment variables for version and ref_name in GitHub Actions.

0 commit comments

Comments
 (0)