1- name : Release shared
1+ name : Release shared - Helper workflow
2+
3+ # This workflow is intended to be invoked by other workflows.
4+ # It is no longer meant to be invoked directly.
25
36on :
47 workflow_call :
3134 - name : Check if release is possible
3235 run : |
3336 if ! reason=$(npx tsx ./scripts/is-releasable.ts); then
34- echo "::error:: $reason"
37+ echo "🛑 Unable to release: $reason" >> $GITHUB_STEP_SUMMARY
3538 exit 1
3639 fi
3740
@@ -45,19 +48,23 @@ jobs:
4548 run :
4649 npx tsx ./scripts/latest-changelog-entry.ts > release_notes.md
4750
48- - name : Determine next tag
49- id : determine-next-tag
51+ - name : Determine next version
52+ id : determine-next-version
5053 uses : actions/github-script@v7
5154 with :
5255 script : |
53- const version = require('./package.json').version;
54- core.setOutput('tag', `v${version.replace('.0.0', '')}`);
56+ const version = require('./package.json').version.replace('.0.0', '');
57+ core.setOutput('version', version);
58+ core.setOutput('tag', `v${version}`);
5559
5660 - name : Create GitHub release
5761 run : |
58- gh release create "${{ steps.determine-next-tag .outputs.tag }}" \
59- --title "${{ steps.determine-next-tag .outputs.tag }}" \
62+ gh release create "${{ steps.determine-next-version .outputs.tag }}" \
63+ --title "${{ steps.determine-next-version .outputs.tag }}" \
6064 --notes-file release_notes.md
6165
6266 - name : Publish to npm
63- run : npm publish
67+ run : |
68+ npm publish
69+
70+ echo "✅ Successfully released package [pc-nrfconnect-shared@${{ steps.determine-next-version.outputs.version }}](https://www.npmjs.com/package/@nordicsemiconductor/pc-nrfconnect-shared/v/${{ steps.determine-next-version.outputs.version }}.0.0) to npm." >> $GITHUB_STEP_SUMMARY
0 commit comments