Skip to content

Commit

Permalink
try to use env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
foxriver76 committed Jul 23, 2024
1 parent 1d108b8 commit b6df3a5
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 23 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/create-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,15 @@ 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: |
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'}"
BODY="${BODY//$'\r'/'%0D'}"
echo "::set-output name=BODY::$BODY"
echo "COMMIT_BODY=$BODY" >> $GITHUB_ENV
- name: Create Pull Request
id: cpr
Expand All @@ -81,8 +78,7 @@ jobs:
branch: official-release
delete-branch: true
title: "[OFFICIAL RELEASE] ${{ steps.version.outputs.result }}"
body: |
${{ steps.extract_release.outputs.BODY }}
body: $COMMIT_BODY
labels: |
automated pr 🔧
assignees: foxriver76
Expand Down
29 changes: 14 additions & 15 deletions .github/workflows/test-and-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,19 @@ jobs:
os: ${{ matrix.os }}
build: false

extract-commit:
if: steps.automerge.outputs.mergeResult == 'merged'
# The body may be multiline, therefore we need to escape some characters
runs-on: ubuntu-latest
steps:
- name: Extract Commit
run: |
BODY=$(git show -s --format=%b)
BODY="${BODY//'%'/'%25'}"
BODY="${BODY//$'\n'/'%0A'}"
BODY="${BODY//$'\r'/'%0D'}"
echo "COMMIT_BODY=$BODY" >> $GITHUB_ENV
auto-merge:
if: |
always() &&
Expand Down Expand Up @@ -101,20 +114,6 @@ jobs:
npm whoami
npm publish
- name: Extract the version and commit body from the tag
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'}"
BODY="${BODY//$'\r'/'%0D'}"
echo "::set-output name=BODY::$BODY"
- name: Create Github Release
if: steps.automerge.outputs.mergeResult == 'merged'
uses: ncipollo/release-action@v1
Expand All @@ -125,5 +124,5 @@ jobs:
name: Release v${{ steps.version.outputs.result }}
draft: false
prerelease: ${{ contains(steps.version.outputs.result, '-') }}
body: ${{ steps.extract_release.outputs.BODY }}
body: $COMMIT_BODY

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -908,7 +908,7 @@ The adapter is tested with an DENON AVR-X1200W and a Marantz SR5009.
Placeholder for the next version (at the beginning of the line):
### __WORK IN PROGRESS__
-->
### 1.15.10 (2024-07-23)
### __WORK IN PROGRESS__
* (foxriver76) updated dependencies
* (foxriver76) added tier and license information
* (foxriver76) fixed invalid object `denon.0`
Expand Down

0 comments on commit b6df3a5

Please sign in to comment.