Skip to content

Release Rizzybox

Release Rizzybox #18

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
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 artifacts
env:
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: |
mkdir -p ./artifacts
gh run download ${{ env.run_id }} --dir ./artifacts
ls -l ./artifacts/rizzybox-*.tar.gz || { echo "No artifacts found"; exit 1; }
- name: Create GitHub Release
env:
GH_TOKEN: ${{ secrets.RELEASE_TOKEN }}
run: |
gh release create ${{ github.ref_name }} ./artifacts/rizzybox-*.tar.gz/* --title "Release ${{ github.ref_name }}" --prerelease