Skip to content

Commit

Permalink
follow our own advice 🙈
Browse files Browse the repository at this point in the history
  • Loading branch information
AlCalzone committed Nov 29, 2020
1 parent e033b81 commit 2244c5d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,16 +85,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"
- name: Install dependencies
run: npm ci
Expand All @@ -115,11 +116,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 }}

- name: Update ioBroker.template repo
run: bash .github/update_templates.sh
Expand Down

0 comments on commit 2244c5d

Please sign in to comment.