Skip to content

Commit

Permalink
feat(workflow): Add a release after publishing on npm
Browse files Browse the repository at this point in the history
  • Loading branch information
folland87 committed Feb 15, 2024
1 parent 44b76b6 commit 6776fc3
Showing 1 changed file with 31 additions and 0 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/tags.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,40 @@ jobs:
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

release:
name: Create new Github release
runs-on: ubuntu-latest
needs: publish
steps:
- name: 🏁 Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: 🏷️ Get tag
id: tag
run: echo "tag=${GITHUB_REF#refs/tags/}" >> $GITHUB_OUTPUT

- name: Create changelog text
id: changelog
uses: loopwerk/tag-changelog@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
config_file: .github/config/changelog.js

- name: 📦 Create release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ steps.tag.outputs.tag }}
name: ${{ steps.tag.outputs.tag }}
body: "${{ steps.changelog.outputs.changes }}"

notify:
needs:
- publish
- release
if: always()
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 6776fc3

Please sign in to comment.