-
-
Notifications
You must be signed in to change notification settings - Fork 900
37 lines (35 loc) · 1.05 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
name: release
on:
push:
tags: ["*"]
jobs:
build:
uses: ./.github/workflows/backend.yml
publish:
needs: [build]
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- name: Check version bump
run: |
TAG=$(git describe --tags --match "[0-9]*.[0-9]*.[0-9]*" --abbrev=8)
VERSION=$(grep project CMakeLists.txt| awk '{print $3}')
if [ "$TAG" != "$VERSION" ]; then
echo "=== Version in CMakeLists.txt and git tag does not match!"
echo "=== Git Tag: $TAG, Version: $VERSION"
exit 1
fi
- uses: actions/download-artifact@v4
- run: |
mkdir build
for file in ttyd.*/*; do
target=$(echo $file | awk -F/ '{print $1}')
[[ $file == *.exe ]] && target="$target.exe"
mv $file build/$target
done
pushd build; sha256sum ttyd.* > SHA256SUMS; popd
- uses: ncipollo/release-action@v1
with:
artifacts: build/*
allowUpdates: true
draft: true