-
Notifications
You must be signed in to change notification settings - Fork 28
41 lines (35 loc) · 990 Bytes
/
publish.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
name: Publish
on:
push:
branches:
- main
jobs:
setup:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Compile
run: |
make
- name: Get version
id: version
run: |
VERSION="$(bash gxadmin -v)"
VERSION_NEXT=$(( VERSION + 1 ))
echo "::set-output name=version::${VERSION_NEXT}"
TS="$(date +%s)"
echo "::set-output name=timestamp::${TS}"
echo "::set-output name=tag::v${VERSION}-preview-${TS}"
- name: Extract changelog
run: |
echo "**This is an automated pre-release**" > body.md
echo "" >> body.md
bash gxadmin meta whatsnew >> body.md
- uses: ncipollo/release-action@v1
with:
artifacts: "gxadmin"
artifactContentType: text/x-shellscript
bodyFile: body.md
commit: main
draft: true
tag: ${{ steps.version.outputs.tag }}