Skip to content

Commit

Permalink
.github: add support for prerelease/latest tagging
Browse files Browse the repository at this point in the history
Synced from Finit release.yml

Signed-off-by: Joachim Wiberg <[email protected]>
  • Loading branch information
troglobit committed Nov 10, 2024
1 parent b10ea9d commit 5dda887
Showing 1 changed file with 18 additions and 1 deletion.
19 changes: 18 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,28 @@ jobs:
run: |
sudo apt-get -y update
sudo apt-get -y install pkg-config libsystemd-dev
- name: Setting release variables ...
id: build
run: |
ver=${GITHUB_REF#refs/tags/}
echo "ver=${ver}" >> $GITHUB_OUTPUT
if echo $ver | grep -qE '^[0-9]+\.[0-9]+(\.[0-9]+)?(-alpha|-beta|-rc)[0-9]*$'; then
echo "pre=true" >> $GITHUB_OUTPUT
else
echo "pre=false" >> $GITHUB_OUTPUT
fi
if echo $ver | grep -qE '^[0-9.]+\.[0-9.]+(\.[0-9]+)?$'; then
echo "latest=true" >> $GITHUB_OUTPUT
else
echo "latest=false" >> $GITHUB_OUTPUT
fi
- name: Creating Makefiles ...
run: |
./autogen.sh
./configure
- name: Build release ...
run: |
make release
make release || (cat test/test-suite.log; false)
ls -lF ../
mkdir -p artifacts/
mv ../*.tar.* artifacts/
Expand All @@ -34,5 +49,7 @@ jobs:
- uses: ncipollo/release-action@v1
with:
name: mrouted v${{ github.ref_name }}
prerelease: ${{ steps.build.outputs.pre }}
makeLatest: ${{ steps.build.outputs.latest }}
bodyFile: "release.md"
artifacts: "artifacts/*"

0 comments on commit 5dda887

Please sign in to comment.