Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 12 additions & 8 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,25 @@ jobs:
else
echo "tag=latest" >> $GITHUB_OUTPUT
fi
############# NPM PUBLISH ##############
- run: npm ci
- run: npm publish --tag ${{ steps.npm-tag.outputs.tag }}
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
############# GITHUB RELEASE ##############
# Tag + release only run after a successful publish, so a failed
# publish never leaves an orphaned tag that blocks reruns.
- name: Extract release notes
id: extract-release-notes
if: steps.npm-tag.outputs.tag == 'latest'
uses: ffurrer2/extract-release-notes@v1
############# TAG RELEASE ##############
- name: 'Push tag v${{ steps.package-version.outputs.current-version }}'
if: steps.npm-tag.outputs.tag == 'latest'
uses: rickstaa/action-create-tag@v1
id: tag_version
with:
tag: 'v${{ steps.package-version.outputs.current-version }}'
############# GITHUB RELEASE ##############
- name: Extract release notes
id: extract-release-notes
uses: ffurrer2/extract-release-notes@v1
- name: 'Create a GitHub release v${{ steps.package-version.outputs.current-version }}'
if: steps.npm-tag.outputs.tag == 'latest'
uses: ncipollo/release-action@v1
Expand All @@ -62,7 +70,3 @@ jobs:
name: 'Release v${{ steps.package-version.outputs.current-version }}'
body: |
${{ steps.extract-release-notes.outputs.release_notes }}
- run: npm ci
- run: npm publish --tag ${{ steps.npm-tag.outputs.tag }}
env:
NODE_AUTH_TOKEN: ${{secrets.NODE_AUTH_TOKEN}}
Loading