-
Notifications
You must be signed in to change notification settings - Fork 1
43 lines (37 loc) · 1.34 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
name: Prerelease Pipeline
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# - name: Build
# run: make build
- name: Determine Version Number
id: version
run: |
echo "YEAR=$(date +%Y)" >> $GITHUB_OUTPUT
echo "MINOR=$(git log --oneline HEAD...$(git tag -l --sort=-creatordate|grep -v 'pre'|head -n 1)|wc -l)" >> $GITHUB_OUTPUT
LAST_VERSION_TAG=$(git tag -l --sort=-creatordate|grep -v 'pre'|head -n 1)
echo "Last Version: "
git tag -l --sort=-creatordate
//|grep -v 'pre'|head -n 1
LAST_MAJOR=$(echo $LAST_VERSION_TAG|sed -E 's/^[^\.]+\.//g;s/\..+//g')
echo "Last Major: "$LAST_MAJOR
MAJOR=$(($LAST_MAJOR+1))
echo "Minor: "$MINOR
echo $YEAR.$MAJOR.$MINOR-pre
echo "TAG_NAME=$YEAR.$MAJOR.$MINOR-pre" >> $GITHUB_OUTPUT
- name: Release
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.version.outputs.YEAR }}.2.${{ steps.version.outputs.MINOR }}-pre
name: Prerelease - ${{ steps.version.outputs.TAG_NAME }}
draft: true
make_latest: false
token: ${{ secrets.GIT_TOKEN }}
files: |
build/cekwebhooks-linux-amd64.so
build/cekwebhooks-linux-arm-7.so
build/cekwebhooks-linux-arm64.so