Release-Tags nach Paketbuild direkt veröffentlichen
This commit is contained in:
1 parent
5a1a284505
commit
ccc372778c
19 files changed
+278
-387
No files matched your search
@@ -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"
|
||||
Reference in new issue
Block a user