Skip to content

Commit

Permalink
Create changelog and release automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
ostefano committed Aug 24, 2024
1 parent 7bf3a9f commit 1b30cca
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,39 @@ on:

jobs:

relase:
runs-on: ubuntu-latest
steps:

- name: Checkout repository
uses: actions/checkout@v4

- name: Get previous tag
id: previousTag
run: |
name=$(git --no-pager tag --sort=creatordate --merged ${{ github.ref_name }} | tail -2 | head -1)
echo "previousTag: $name"
echo "previousTag=$name" >> $GITHUB_ENV
- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
fromTag: ${{ github.ref_name }}
toTag: ${{ env.previousTag }}
writeToFile: false

- name: Create Release
uses: ncipollo/[email protected]
with:
allowUpdates: true
draft: true
makeLatest: true
name: ${{ github.ref_name }}
body: ${{ steps.changelog.outputs.changes }}
token: ${{ secrets.GITHUB_TOKEN }}

docs:
runs-on: ubuntu-latest
steps:
Expand Down

0 comments on commit 1b30cca

Please sign in to comment.