Release-Tags nach Paketbuild direkt veröffentlichen

This commit is contained in:
hugo committed 2026-09-11 23:08:44 +02:00
1 parent 5a1a284505
commit ccc372778c
19 files changed
+278 -387

No files matched your search

+7 -32
View File
@@ -1,19 +1,14 @@
name: Release-Build und Pflichtabnahme
name: Release-Build und Veröffentlichung
on:
push:
tags: ['v[0-9]*.[0-9]*.[0-9]*']
permissions:
contents: read
jobs:
checks:
preflight:
runs-on: linux-arm64
container: ghcr.io/rust-cross/cargo-zigbuild@sha256:82af75c41958c2af2787e8bedd912da7678a9438937e223e9d83d006d747b38b
timeout-minutes: 60
env:
CARGO_BUILD_JOBS: '2'
TB_VBDOS_REPOSITORY: ${{ vars.TB_VBDOS_REPOSITORY }}
TB_VBDOS_REPO: /tmp/tb-vbdos
TB_RUN_URL: ${{ gitea.server_url }}/${{ gitea.repository }}/actions/runs/${{ gitea.run_number }}
steps:
# Vor checkout nötig: Die Cross-Images enthalten kein Node für JS-Actions.
- name: Gepinnte Actions-Laufzeit
@@ -38,27 +33,8 @@ jobs:
version = tomllib.loads((dist.ROOT / 'Cargo.toml').read_text())['workspace']['package']['version']
dist.require(release_version(os.environ['TB_TAG']) == version, 'Tag und Workspace-Version weichen ab')
PYTHON
- name: Gepinnte Werkzeuge
run: sh .gitea/scripts/bootstrap.sh
- name: Fixierten Fremdbestand bereitstellen
run: |
set -eu
test -n "$TB_VBDOS_REPOSITORY" || { echo 'TB_VBDOS_REPOSITORY für Pflichtabnahme fehlt'; exit 1; }
git init "$TB_VBDOS_REPO"
git -C "$TB_VBDOS_REPO" fetch --depth=1 "$TB_VBDOS_REPOSITORY" 1cdd2b32b829fe1721d0b6aecc433abc47a96fb6
git -C "$TB_VBDOS_REPO" checkout --detach FETCH_HEAD
- name: Paket- und Release-Regressionen
run: python3 -m unittest discover -s .gitea/scripts -p 'test_*.py'
- name: Workspace, Inventar, Fremdprogramme und Referenzbenchmarks
run: python3 .gitea/scripts/acceptance.py
- uses: https://gitea.com/actions/upload-artifact@ff15f0306b3f739f7b6fd43fb5d26cd321bd4de5
if: always()
with:
name: acceptance
path: acceptance/
if-no-files-found: error
build:
needs: checks
needs: preflight
runs-on: linux-arm64
timeout-minutes: 90
strategy:
@@ -98,9 +74,9 @@ jobs:
name: packages-${{ matrix.target }}
path: dist/
if-no-files-found: error
stage:
release:
if: startsWith(gitea.ref, 'refs/tags/v') && gitea.event_name == 'push'
needs: [checks, build]
needs: [preflight, build]
runs-on: linux-arm64
container: ghcr.io/rust-cross/cargo-zigbuild@sha256:82af75c41958c2af2787e8bedd912da7678a9438937e223e9d83d006d747b38b
steps:
@@ -120,7 +96,7 @@ jobs:
with:
path: artifacts
- run: cargo build --locked --release -p tb-export --bin tb-template
- name: Vollständigen Releaseentwurf erstellen
- name: Pakete hochladen und Release veröffentlichen
env:
GITEA_SERVER_URL: ${{ gitea.server_url }}
GITEA_REPOSITORY: ${{ gitea.repository }}
@@ -130,5 +106,4 @@ jobs:
run: |
mkdir packages
cp artifacts/packages-*/*.7z artifacts/packages-*/*.tar.gz artifacts/packages-*/*.sha256 packages/
cp artifacts/acceptance/acceptance.json packages/
python3 .gitea/scripts/release.py stage --packages packages --tag "$TB_TAG" --revision "$TB_REVISION"
python3 .gitea/scripts/release.py --packages packages --tag "$TB_TAG" --revision "$TB_REVISION"
-40
View File
@@ -1,40 +0,0 @@
name: Geprüften Gitea-Entwurf freigeben
on:
workflow_dispatch:
inputs:
tag:
description: 'Vorhandener Versionstag, z.B. v1.0.0'
required: true
evidence_commit:
description: '40-stellige Origin-Revision mit release-evidence/<tag>/'
required: true
permissions:
contents: read
jobs:
publish:
if: gitea.ref == 'refs/heads/main'
runs-on: linux-arm64
container: ghcr.io/rust-cross/cargo-zigbuild@sha256:82af75c41958c2af2787e8bedd912da7678a9438937e223e9d83d006d747b38b
steps:
# Vor checkout nötig: Die Cross-Images enthalten kein Node für JS-Actions.
- name: Gepinnte Actions-Laufzeit
run: |
set -eu
curl -fsSL https://nodejs.org/dist/v22.22.0/node-v22.22.0-linux-arm64.tar.xz -o /tmp/tb-node.tar.xz
echo '1bf1eb9ee63ffc4e5d324c0b9b62cf4a289f44332dfef9607cea1a0d9596ba6f /tmp/tb-node.tar.xz' | sha256sum -c -
tar -xJf /tmp/tb-node.tar.xz -C /usr/local --strip-components=1
node --version
- uses: https://gitea.com/actions/checkout@11d5960a326750d5838078e36cf38b85af677262
with:
fetch-depth: 0
persist-credentials: false
- run: sh .gitea/scripts/bootstrap.sh
- run: cargo build --locked --release -p tb-export --bin tb-template
- name: Originalpakete und revisionsgebundene Zielnachweise prüfen
env:
GITEA_SERVER_URL: ${{ gitea.server_url }}
GITEA_REPOSITORY: ${{ gitea.repository }}
TB_RELEASE_TOKEN: ${{ secrets.TB_RELEASE_TOKEN || gitea.token }}
TB_TAG: ${{ inputs.tag }}
TB_EVIDENCE_REVISION: ${{ inputs.evidence_commit }}
run: python3 .gitea/scripts/publish.py