Export the frozen preview to its draft on GitHub runners
This commit is contained in:
1 parent
7ecaa42b29
commit
991b471fdb
4 files changed
+400
No files matched your search
@@ -0,0 +1,76 @@
|
||||
name: Upload frozen preview to existing draft
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
permissions: {}
|
||||
|
||||
concurrency:
|
||||
group: frozen-preview-v0.1.0-preview.20261020
|
||||
cancel-in-progress: false
|
||||
|
||||
jobs:
|
||||
upload-draft:
|
||||
if: github.repository == 'Quintine/RustRaptor'
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 180
|
||||
permissions:
|
||||
contents: write
|
||||
env:
|
||||
PYTHONDONTWRITEBYTECODE: '1'
|
||||
steps:
|
||||
- name: Make room before any source checkout
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
minimum=25000000000
|
||||
available() { df --output=avail -B1 "$GITHUB_WORKSPACE" | tail -1 | tr -d ' '; }
|
||||
for directory in /usr/local/lib/android /usr/share/dotnet /opt/ghc; do
|
||||
if (( $(available) >= minimum )); then break; fi
|
||||
sudo rm -rf -- "$directory"
|
||||
done
|
||||
(( $(available) >= minimum )) || { echo 'Need at least 25GB free before source checkout.' >&2; exit 1; }
|
||||
df -h "$GITHUB_WORKSPACE"
|
||||
- name: Fetch only the publishing controller from this maintenance commit
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.sha }}
|
||||
path: controller
|
||||
filter: blob:none
|
||||
sparse-checkout-cone-mode: false
|
||||
sparse-checkout: |
|
||||
/tools/upload_draft_release.py
|
||||
/tools/test_upload_draft_release.py
|
||||
persist-credentials: false
|
||||
- name: Fetch the immutable tested game checkpoint
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: 7ecaa42b29ff0db5d2f7cdfe6da0a3221dfea555
|
||||
path: frozen
|
||||
fetch-depth: 1
|
||||
persist-credentials: false
|
||||
- uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: '3.12'
|
||||
- name: Test the existing exporter and publishing guards
|
||||
shell: bash
|
||||
run: |
|
||||
set -euo pipefail
|
||||
python -B -m unittest discover -s frozen/tools -p test_export_release.py -v
|
||||
python -B -m unittest discover -s controller/tools -p test_upload_draft_release.py -v
|
||||
- name: Export and verify every asset on the existing draft
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
run: >-
|
||||
python -B controller/tools/upload_draft_release.py
|
||||
--package "$GITHUB_WORKSPACE/frozen"
|
||||
--state "$RUNNER_TEMP/RustRaptor-draft-export-state"
|
||||
--temporary "$RUNNER_TEMP/RustRaptor-single-export"
|
||||
- name: Retain frozen plan, local receipts, remote proofs and logs
|
||||
if: always()
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: frozen-preview-draft-export-${{ github.run_id }}-${{ github.run_attempt }}
|
||||
path: ${{ runner.temp }}/RustRaptor-draft-export-state
|
||||
if-no-files-found: warn
|
||||
retention-days: 30
|
||||
Reference in new issue
Block a user