Prerelease Pipeline #5
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
name: Prerelease Pipeline | |
on: | |
workflow_dispatch: | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Build All Versions | |
run: make build | |
- name: Determine Version Number and Change Log | |
id: version | |
run: | | |
YEAR=$(date +%Y) | |
LAST_VERSION_TAG=$(git tag -l --sort=-creatordate|grep -v 'pre'|head -n 1) | |
LAST_MAJOR=$(echo $LAST_VERSION_TAG|sed -E 's/^[^\.]+\.//g;s/\..+//g') | |
MAJOR=$(($LAST_MAJOR+1)) | |
MINOR=$(git log --oneline HEAD...$LAST_VERSION_TAG|wc -l) | |
echo "TAG_NAME=$YEAR.$MAJOR.$MINOR-pre" >> $GITHUB_OUTPUT | |
printf "CHANGE=\"$(sed -E '/---/q;/^## .*$/d' CHANGELOG.md|sed '/^---$/d')\"\n" >> $GITHUB_OUTPUT | |
- name: Release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: ${{ steps.version.outputs.TAG_NAME }} | |
name: Prerelease - ${{ steps.version.outputs.TAG_NAME }} | |
body: ${{ steps.version.outputs.CHANGE }} | |
draft: true | |
make_latest: false | |
prerelease: true | |
token: ${{ secrets.GIT_TOKEN }} | |
files: | | |
build/cekwebhooks-linux-amd64.so | |
build/cekwebhooks-linux-arm-7.so | |
build/cekwebhooks-linux-arm64.so |