Skip to content

Commit

Permalink
fix: update test and release workflow in README (#82)
Browse files Browse the repository at this point in the history
Co-authored-by: AlCalzone <d.griesel@gmx.net>
  • Loading branch information
Jey-Cee and AlCalzone authored Jul 25, 2021
1 parent 76895f5 commit 66c67d4
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -237,16 +237,17 @@ jobs:
node-version: ${{ matrix.node-version }}
- name: Extract the version and commit body from the tag
id: extract_release
# The body may be multiline, therefore we need to escape some characters
run: |
VERSION="${{ github.ref }}"
VERSION=${VERSION##*/v}
echo "::set-env name=VERSION::$VERSION"
echo "::set-output name=VERSION::$VERSION"
BODY=$(git show -s --format=%b)
BODY="${BODY//'%'/'%25'}"
BODY="${BODY//$'\n'/'%0A'}"
BODY="${BODY//$'\r'/'%0D'}"
echo "::set-env name=BODY::$BODY"
echo "::set-output name=BODY::$BODY"
# If you are using TypeScript, additional build steps might be necessary
# Run them here, e.g.:
Expand All @@ -267,11 +268,11 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release v${{ env.VERSION }}
release_name: Release v${{ steps.extract_release.outputs.VERSION }}
draft: false
# Prerelease versions create prereleases on Github
prerelease: ${{ contains(env.VERSION, '-') }}
body: ${{ env.BODY }}
prerelease: ${{ contains(steps.extract_release.outputs.VERSION, '-') }}
body: ${{ steps.extract_release.outputs.BODY }}
```
## License
Expand Down

0 comments on commit 66c67d4

Please sign in to comment.