Skip to content

Commit 21e931c

Browse files
committed
fix worker regarding release content body, need to prepare it first
1 parent 3dc782e commit 21e931c

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

.github/workflows/push-tagged-release.yml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,15 +71,20 @@ jobs:
7171
run: yarn publish --access public
7272
env:
7373
NODE_AUTH_TOKEN: ${{ secrets.npmjsToken }}
74+
- name: Prepare release info
75+
# only use for final releases and RCs -- other pre-releases do not need an official announcement
76+
if: inputs.onlyNpmPush != true
77+
run: |
78+
touch ./releasecontent.md
79+
echo "* NPM package: https://www.npmjs.com/package/@eccenca/gui-elements/v/${{ steps.info-vars.outputs.version }}" >> ./releasecontent.md
80+
$( if [[ ! "${{ inputs.sectionChangelog }}" =~ ^(Unreleased)$ ]]; then echo "* Storybook: ${{ steps.chromatic-upload.outputs.storybookUrl }}" >> ./releasecontent.md; fi )
81+
$( if [[ ! "${{ inputs.sectionChangelog }}" =~ ^(Unreleased)$ ]]; then echo "${{ steps.info-changelog.outputs.changes }}" >> ./releasecontent.md; else echo "* Changelog: https://github.com/eccenca/gui-elements/blob/${{ inputs.ref }}/CHANGELOG.md#unreleased" >> ./releasecontent.md; fi )
7482
- name: Publish release
7583
# only use for final releases and RCs -- other pre-releases do not need an official announcement
7684
if: inputs.onlyNpmPush != true
7785
uses: ncipollo/release-action@v1
7886
with:
7987
tag: ${{ steps.info-vars.outputs.tag }}
80-
body: |
81-
* NPM package: https://www.npmjs.com/package/@eccenca/gui-elements/v/${{ steps.info-vars.outputs.version }}
82-
$(if [[ ! "${{ inputs.sectionChangelog }}" =~ ^(Unreleased)$ ]]; then echo "* Storybook: ${{ steps.chromatic-upload.outputs.storybookUrl }}"; fi)
83-
$(if [[ ! "${{ inputs.sectionChangelog }}" =~ ^(Unreleased)$ ]]; then echo "${{ steps.info-changelog.outputs.changes }}"; else echo "* Changelog: https://github.com/eccenca/gui-elements/blob/${{ inputs.ref }}/CHANGELOG.md#unreleased"; fi)
88+
bodyFile: ./releasecontent.md
8489
prerelease: ${{ steps.info-changelog.outputs.status == 'unreleased' }}
8590
token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)