Skip to content

Commit

Permalink
Update release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
AdrianTM committed Jul 24, 2024
1 parent bdc909b commit 946d4a8
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,27 @@ jobs:
- name: Get Latest Changelog Entry
id: get-changelog
run: |
changelog=$(awk '/^mx-repo-list/{i++} i==1' debian/changelog | grep '^[[:space:]]*\*')
changelog=$(awk '
BEGIN { changes = ""; release_found = 0; in_changes = 0 }
/^'${{ github.event.repository.name }}'/ {
if (release_found == 1) exit
release_found = 1
next
}
release_found == 1 && /^\s*\*/ {
in_changes = 1
}
release_found == 1 && in_changes == 1 {
if ($0 ~ /^\s*\*/) {
changes = changes $0 "\n"
} else if ($0 ~ /^\s+/) {
changes = changes $0 "\n"
} else {
exit
}
}
END { print changes }
' debian/changelog)
echo "changelog<<EOF" >> $GITHUB_ENV
echo "$changelog" >> $GITHUB_ENV
echo "EOF" >> $GITHUB_ENV
Expand All @@ -25,12 +45,12 @@ jobs:
id: create_release
uses: ncipollo/release-action@v1
with:
name: Release ${{ github.ref_name }}
name: Release ${{ github.ref_name }}
body: |
### Automated release created for tag *${{ github.ref_name }}*
- Direct download link: [![build service)](https://build.opensuse.org/projects/home:mx-packaging/packages/mx-repo-list/badge.svg?type=default)](https://software.opensuse.org//download.html?project=home%3Amx-packaging&package=mx-repo-list)
- In repos: [![latest packaged version](https://repology.org/badge/latest-versions/mx-repo-list.svg)](https://repology.org/project/mx-repo-list/versions)
- Direct download link: [![build service](https://build.opensuse.org/projects/home:mx-packaging/packages/${{ github.event.repository.name }}/badge.svg?type=default)](https://software.opensuse.org//download.html?project=home%3Amx-packaging&package=${{ github.event.repository.name }})
- In repos: [![latest packaged version](https://repology.org/badge/latest-versions/${{ github.event.repository.name }}.svg)](https://repology.org/project/${{ github.event.repository.name }}/versions)
### Changelog
${{ env.changelog }}
Expand Down

0 comments on commit 946d4a8

Please sign in to comment.