-
Notifications
You must be signed in to change notification settings - Fork 124
64 lines (60 loc) · 2 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
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
- name: Install build dependencies
run: |
sudo apt install -y ronn
- name: Configure
run: |
echo "VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
echo "${GITHUB_REF#refs/*/v}" > .tarball-version
./bootstrap.sh
./configure
- 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 }}.zip
vcsh-${{ env.VERSION }}.tar.xz
deploy-standalone:
runs-on: ubuntu-latest
needs: [ ghrelease ]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Configure standalone script
run: |
echo "${GITHUB_REF#refs/*/v}" > .tarball-version
./bootstrap.sh
./configure --with-standalone --bindir=/
make DESTDIR=. install-exec
- name: Add standalone deployment to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ github.token }}
file: vcsh-standalone.sh
tag: ${{ github.ref }}