-
Notifications
You must be signed in to change notification settings - Fork 1
56 lines (46 loc) · 1.5 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
name: Release
on:
push:
tags:
- '*'
jobs:
Publish:
runs-on: ubuntu-latest
environment: CIRRUS-CI
env:
GH_REPO: ${{ github.repository }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
permissions:
contents: write
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.ref_name }}
submodules: true
- name: Setup Rye
run: |
curl -sSL https://rye-up.com/get | RYE_INSTALL_OPTION="--yes" bash
source "${HOME}/.rye/env"
cd .github/cirrus-ci-tools
rye sync
- name: Cirrus CI Build
run: |
source .github/cirrus-ci-tools/.venv/bin/activate
config='.github/cirrus-ci/build_toolchain.yml'
urls="$(trigger-cirrus-ci --token ${{ secrets.CIRRUS_CI_TOKEN }} --repository ${{ github.repository }} \
--branch main --config "${config}" --timeout 240)"
while read -r url; do
echo "The artifact url: ${url}"
curl -L ${url} -o binary.zip
unzip binary.zip
done <<<"${urls}"
- name: Upload
run: |
content="$(cat .github/templates/release.md)"
pushd output >/dev/null
content="${content/<MD5SUM>/$(md5sum *)}"
content="${content/<SHA256SUM>/$(sha256sum *)}"
popd >/dev/null
echo "${content}" >note.md
gh release create -t "devel-env ${{ github.ref_name }}" -F note.md ${{ github.ref_name }} output/*