Files
Dreierpack-Manager/.github/workflows/release.yml
T
ClaudeandClaude Sonnet 5.5 6cccbb01d3
Prepare verified release / draft (push) Waiting to run
Prepare Classic 1.0.7 patch release
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-05 21:12:49 +01:00

66 lines
2.6 KiB
YAML

# SPDX-License-Identifier: GPL-3.0-only
name: Prepare verified release
on:
push:
tags: ['v*']
permissions:
contents: read
actions: read
jobs:
draft:
runs-on: ubuntu-24.04
permissions:
contents: write
actions: read
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
persist-credentials: false
fetch-depth: 0
- name: Locate successful CI for this exact revision
id: ci
env:
GH_TOKEN: ${{ github.token }}
EXPECTED_SHA: ${{ github.sha }}
run: |
gh api "repos/$GITHUB_REPOSITORY/actions/workflows/ci.yml/runs?status=success&event=push&per_page=100" > ci-runs.json
python3 - <<'PY'
import json, os
runs = json.load(open('ci-runs.json'))['workflow_runs']
matches = [r for r in runs if r['head_sha'] == os.environ['EXPECTED_SHA'] and
r['conclusion'] == 'success' and r['event'] == 'push' and
r['head_repository']['full_name'].lower() == os.environ['GITHUB_REPOSITORY'].lower()]
if not matches:
raise SystemExit('Run the full CI successfully for this revision before tagging a release')
with open(os.environ['GITHUB_OUTPUT'], 'a') as output:
output.write('run_id=' + str(matches[0]['id']) + '\n')
PY
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
github-token: ${{ github.token }}
run-id: ${{ steps.ci.outputs.run_id }}
pattern: OpenBMH-*
path: dist
merge-multiple: true
- uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4.3.0
with:
github-token: ${{ github.token }}
run-id: ${{ steps.ci.outputs.run_id }}
pattern: tests-*
path: test-reports
- name: Verify archives, corresponding source and platform reports
env:
RELEASE_TAG: ${{ github.ref_name }}
CI_RUN: ${{ steps.ci.outputs.run_id }}
run: |
python3 tools/package/verify_ci_release.py --dist dist --reports test-reports --tag "$RELEASE_TAG" --source-sha "$GITHUB_SHA" --ci-run "$CI_RUN" --repository "$GITHUB_REPOSITORY"
- name: Create draft for review
env:
GH_TOKEN: ${{ github.token }}
RELEASE_TAG: ${{ github.ref_name }}
run: |
gh release create "$RELEASE_TAG" dist/*.zip dist/SHA256SUMS dist/QA-REPORT.json --draft --verify-tag --title "OpenBMH $RELEASE_TAG" --notes-file docs/release/1.0.7/RELEASE_NOTES.md