-
Notifications
You must be signed in to change notification settings - Fork 124
70 lines (66 loc) · 2.18 KB
/
release.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
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
name: Release
on:
push:
tags:
- v[0-9]+.[0-9]+.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+-alpha.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+-beta.[0-9]+
- v[0-9]+.[0-9]+.[0-9]+-rc.[0-9]+
jobs:
ghrelease:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch tags
run: |
git fetch --prune --tags ||:
- name: Install build dependencies
run: |
sudo apt install -y ronn
- name: Configure
run: |
echo "VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
./bootstrap.sh
./configure --enable-developer-mode
- name: Generate release-specific changelog
run: |
echo "PRERELEASE=${{ contains(env.VERSION, '-alpha') || contains(env.VERSION, '-beta') || contains(env.VERSION, '-rc') }}" >> $GITHUB_ENV
make changelog-HEAD
- name: If a final release, make sure changelog matches
if: ${{ ! (contains(env.VERSION, '-alpha') || contains(env.VERSION, '-beta') || contains(env.VERSION, '-rc')) }}
run: |
grep -F "* Release ${{ env.VERSION }}" changelog-HEAD
- name: Build source package
run: |
make dist
- name: Publish Release
uses: softprops/action-gh-release@v1
with:
prerelease: ${{ env.PRERELEASE }}
body_path: changelog-HEAD
files: |
vcsh-${{ env.VERSION }}.tar.zst
vcsh-${{ env.VERSION }}.zip
vcsh-${{ env.VERSION }}.sha256.txt
deploy-standalone:
runs-on: ubuntu-latest
needs: [ ghrelease ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure standalone script
run: |
./bootstrap.sh
./configure --with-standalone --bindir=/
make DESTDIR=. install-exec
sha256sum vcsh-standalone.sh | tee vcsh-standalone.sha256.txt
- name: Add standalone deployment to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ github.token }}
tag: ${{ github.ref }}
file_glob: true
file: vcsh-standalone.{sh,sha256.txt}