Some checks failed
Deploy (Gitea) / deploy (push) Failing after 2s
Extracts annotated tag message via git tag --format and passes it as body_path to action-gh-release. Fetch-depth: 0 ensures tag data is available in checkout.
40 lines
1.0 KiB
YAML
40 lines
1.0 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- 'v*'
|
|
|
|
jobs:
|
|
release:
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Create tarball
|
|
run: |
|
|
git archive --format=tar.gz --prefix=passepartout-$(git describe --tags) HEAD -o passepartout.tar.gz
|
|
|
|
- name: Create zipball
|
|
run: |
|
|
git archive --format=zip --prefix=passepartout-$(git describe --tags) HEAD -o passepartout.zip
|
|
|
|
- name: Extract tag message as release notes
|
|
run: |
|
|
git tag -l --format='%(contents)' ${GITHUB_REF#refs/tags/} > /tmp/release-notes.md
|
|
echo "--- Notes preview ---"
|
|
head -20 /tmp/release-notes.md
|
|
|
|
- name: Upload to GitHub Release
|
|
uses: softprops/action-gh-release@v2
|
|
with:
|
|
files: |
|
|
passepartout.tar.gz
|
|
passepartout.zip
|
|
body_path: /tmp/release-notes.md
|
|
generate_release_notes: true |