Skip to content

Commit

Permalink
fix release extraction
Browse files Browse the repository at this point in the history
  • Loading branch information
foxriver76 committed Jul 23, 2024
1 parent 1d108b8 commit 7d61543
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:
const package = require('./package.json');
return package.version
- name: Extract the version and commit body from the tag
- name: Extract the commit body
id: extract_release
# The body may be multiline, therefore we need to escape some characters
run: |
Expand Down
7 changes: 3 additions & 4 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ jobs:
- name: Checkout repository
if: steps.automerge.outputs.mergeResult == 'merged'
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch the history, or this action won't work

- name: Use Node.js 18
if: steps.automerge.outputs.mergeResult == 'merged'
Expand Down Expand Up @@ -101,14 +103,11 @@ jobs:
npm whoami
npm publish
- name: Extract the version and commit body from the tag
- name: Extract the commit body
if: steps.automerge.outputs.mergeResult == 'merged'
id: extract_release
# The body may be multiline, therefore we need to escape some characters
run: |
VERSION="${{ github.ref }}"
VERSION=${VERSION##*/v}
echo "::set-output name=VERSION::$VERSION"
BODY=$(git show -s --format=%b)
BODY="${BODY//'%'/'%25'}"
BODY="${BODY//$'\n'/'%0A'}"
Expand Down

0 comments on commit 7d61543

Please sign in to comment.