-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (41 loc) · 1.18 KB
/
Copy pathrelease.yml
File metadata and controls
48 lines (41 loc) · 1.18 KB
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
name: Release
on:
push:
tags:
- "v*.*.*"
permissions:
contents: write
jobs:
release:
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Validate version tag
run: |
version="$(./period-space --version | awk '{print $2}')"
if [[ "v${version}" != "${GITHUB_REF_NAME}" ]]; then
echo "Tag ${GITHUB_REF_NAME} does not match CLI version v${version}" >&2
exit 1
fi
- name: Validate scripts
run: |
bash -n install.sh
python3 -m py_compile period-space
- name: Build release assets
run: |
mkdir -p dist
cp period-space keyd.conf install.sh dist/
cd dist
sha256sum period-space keyd.conf install.sh > SHA256SUMS
- name: Publish GitHub release
env:
GH_TOKEN: ${{ github.token }}
run: |
gh release create "${GITHUB_REF_NAME}" \
dist/period-space \
dist/keyd.conf \
dist/install.sh \
dist/SHA256SUMS \
--title "period-space ${GITHUB_REF_NAME}" \
--generate-notes