Skip to content

Release Rizzybox

Release Rizzybox #10

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