Release Rizzybox #16
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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.GITHUB_TOKEN }} | |
| run: | | |
| mkdir -p ./artifacts | |
| gh run download ${{ env.run_id }} --dir ./artifacts | |
| - 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 |