-
-
Notifications
You must be signed in to change notification settings - Fork 226
61 lines (51 loc) · 1.7 KB
/
Copy pathrelease.yml
File metadata and controls
61 lines (51 loc) · 1.7 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
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Create release
on:
push:
tags:
- 'v*'
jobs:
build:
uses: ./.github/workflows/ci.yaml
publish:
name: Publish GitHub Release Assets
runs-on: ubuntu-latest
needs: build
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
VERSION: ${{ github.ref_name }}
MESSAGE: |
WIP
---
If hetzner-k3s is useful to you or your company, please consider [sponsoring its development](https://github.com/sponsors/vitobotta).
Sponsorship helps ensure continued maintenance and new features. Thank you to our current sponsors! 🙏
steps:
- name: Download Binaries Built by CI Workflow
uses: actions/download-artifact@v4
with:
pattern: hetzner-k3s-*
merge-multiple: true
- name: Verify All Binaries Present
run: |
set -euo pipefail
expected_binaries=(
"hetzner-k3s-macos-arm64"
"hetzner-k3s-macos-amd64"
"hetzner-k3s-linux-arm64"
"hetzner-k3s-linux-amd64"
)
for expected_binary in "${expected_binaries[@]}"; do
if [[ ! -f "$expected_binary" ]]; then
echo "Error, release requires $expected_binary to be generated by CI workflow"
exit 2
fi
done
echo "All required hetzner-k3s binaries (${expected_binaries[@]}) were resolved, proceeding!"
- name: Upload Binaries to GitHub Release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ env.GITHUB_TOKEN }}
file: hetzner-k3s-*
file_glob: true
tag: ${{ env.VERSION }}
overwrite: true
body: ${{ env.MESSAGE }}