Release artifacts #36
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Builds & attaches release artifacts to a newly published release. | |
name: Release artifacts | |
on: | |
release: | |
types: [published] | |
jobs: | |
# Generates a dist tarball and a checksum file to go with. | |
# | |
# A full build is needed here since we currently bundle some build artifacts | |
# with the tarball (man pages, HTML manuals and .po files) so make use of the | |
# test image, it already contains all the build dependencies. | |
# | |
dist: | |
runs-on: ubuntu-24.04 | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
TAG_NAME: ${{ github.event.release.tag_name }} | |
DIST_EXT: tar.bz2 | |
steps: | |
- name: Checkout release tag | |
uses: actions/checkout@v4 | |
- name: Build image | |
run: | | |
podman build --target base --tag rpm -f tests/Dockerfile . | |
- name: Create dist tarball(s) | |
run: | | |
mkdir _build | |
podman run -v $PWD:/srv:z --workdir /srv/_build -t --rm rpm sh -c \ | |
"cmake -DENABLE_TESTSUITE=OFF -DWITH_DOXYGEN=ON .. && make dist" | |
cd _build | |
- name: Create & dump checksum file | |
working-directory: _build | |
run: | | |
sha256sum *.$DIST_EXT > SHA256SUM | |
cat SHA256SUM | |
- name: Upload dist tarball(s) & checksum file | |
working-directory: _build | |
run: | | |
gh release upload $TAG_NAME *.$DIST_EXT SHA256SUM |