diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 85c9cf9..e068568 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -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/ @@ -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/*"