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 73d0531
Showing 1 changed file with 35 additions and 0 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/release-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,41 @@ on:

jobs:

relase:
runs-on: ubuntu-latest
steps:

- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0

- 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 73d0531

Please sign in to comment.