-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (46 loc) · 1.52 KB
/
release-rizzybox.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
name: Release Rizzybox
on:
workflow_dispatch:
inputs:
ref_name:
description: "Release name"
required: true
default: "latest"
# workflow_run:
# workflows: ["Build Rizzybox"]
# types:
# - completed
jobs:
create_release:
runs-on: ubuntu-22.04
strategy:
matrix:
artifact_name:
[
"rizzybox-riscv64gc-unknown-linux-gnu",
"rizzybox-aarch64-unknown-linux-musl",
"rizzybox-x86_64-unknown-linux-musl",
"rizzybox-aarch64-apple-darwin",
"rizzybox-x86_64-apple-darwin",
]
steps:
- name: Checkout code
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Get latest successful build run ID
id: get_run_id
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
run_id=$(gh run list --workflow="Build Rizzybox" --branch=main --status=success --json databaseId --jq '.[0].databaseId')
echo "run_id=$run_id" >> $GITHUB_ENV
- name: Download artifact
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8
with:
name: ${{ matrix.artifact_name }}
path: ./artifacts
run-id: ${{ env.run_id }}
- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ github.ref_name }} ./artifacts/rizzybox-*.tar.gz --title "Release ${{ github.ref_name }}" --prerelease