Complete original edition rules, season safety and verified 1.0 releases (by Codex)
This commit is contained in:
1 parent
e432f20ae7
commit
f0ef79a119
21 files changed
+563
-30
No files matched your search
@@ -1,5 +1,5 @@
|
||||
# SPDX-License-Identifier: GPL-3.0-only
|
||||
name: Prepare release packages
|
||||
name: Prepare verified release
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -7,34 +7,59 @@ on:
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
actions: read
|
||||
|
||||
jobs:
|
||||
build:
|
||||
uses: ./.github/workflows/ci.yml
|
||||
draft:
|
||||
needs: build
|
||||
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: |
|
||||
for package in dist/*.zip; do
|
||||
case "$(basename "$package")" in
|
||||
OpenBMH-${RELEASE_TAG#v}-*.zip) ;;
|
||||
*) echo "Release tag and package version differ" >&2; exit 1 ;;
|
||||
esac
|
||||
done
|
||||
gh release create "$RELEASE_TAG" dist/*.zip --draft --verify-tag --title "OpenBMH $RELEASE_TAG" --notes-file docs/release/1.0/RELEASE_NOTES.md
|
||||
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/RELEASE_NOTES.md
|
||||
Reference in new issue
Block a user