Skip to content

Commit b67d4b3

Browse files
committed
Add tar.gz archive to each release
Archives from tags on Github are not stable, better use archives that do not change.
1 parent 853d140 commit b67d4b3

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

.github/workflows/prepare-release.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,21 @@ jobs:
1818
run: |
1919
printf '\n-----\n\n' >> release_notes.txt
2020
awk -f .github/workflows/changelog.awk CHANGELOG.md >> release_notes.txt
21+
- name: Create archive
22+
id: archive
23+
run: |
24+
TAG="${GITHUB_REF_NAME}"
25+
REPOSITORY_NAME="${GITHUB_REPOSITORY#*/}"
26+
PREFIX="${REPOSITORY_NAME}-${TAG:1}"
27+
ARCHIVE="${PREFIX}.tar.gz"
28+
29+
echo "tgz=${ARCHIVE}" >> $GITHUB_OUTPUT
30+
31+
git archive --format=tar.gz --prefix="${PREFIX}/" -o "$ARCHIVE" "${TAG}"
2132
- name: Release
2233
uses: softprops/action-gh-release@v1
2334
with:
2435
draft: true
2536
body_path: release_notes.txt
37+
fail_on_unmatched_files: true
38+
files: ${{ steps.archive.outputs.tgz }}

0 commit comments

Comments
 (0)