Skip to content

Commit

Permalink
Get changelog automatically
Browse files Browse the repository at this point in the history
  • Loading branch information
i96751414 committed Jul 7, 2024
1 parent 93055e6 commit 8476ebf
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ jobs:
python-version: [ 3.7 ]
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

Expand All @@ -42,14 +42,15 @@ jobs:
if: success() && github.event_name == 'create' && startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Build assets
run: ./scripts/build.sh

- name: Perform release
run: |
git_tag="$(sed 's|refs/tags/||' <<< "${{ github.ref }}")"
gh release create "${git_tag}" build/*.zip
changelog="$(perl -0777ne '/<news>\s*(.*?)\s*<\/news>/s && print $1' addon.xml)"
gh release create "${git_tag}" build/*.zip --notes "${changelog}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 8476ebf

Please sign in to comment.