ci: allow manual workflow_dispatch runs on master to publish releases
Asteria Qt CI / rebuild-images (linux-arm64) (push) Skipped
Asteria Qt CI / rebuild-images (linux-x86_64) (push) Skipped
Asteria Qt CI / rebuild-images (windows-arm64) (push) Skipped
Asteria Qt CI / rebuild-images (windows-x86_64) (push) Skipped
Asteria Qt CI / build-macos (push) Successful in 10s
Asteria Qt CI / test-macos (push) Successful in 39s
Asteria Qt CI / build-linux (push) Successful in 1m13s
Asteria Qt CI / build-windows (push) Successful in 1m28s
Asteria Qt CI / build-windows-arm64 (push) Successful in 1m28s
Asteria Qt CI / build-linux-arm64 (push) Successful in 1m33s
Asteria Qt CI / package-windows-arm64 (push) Successful in 18s
Asteria Qt CI / package-macos (push) Successful in 57s
Asteria Qt CI / package-windows (push) Successful in 22s
Asteria Qt CI / test-linux (push) Successful in 3m20s
Asteria Qt CI / package-linux-arm64 (push) Successful in 18s
Asteria Qt CI / package-linux (push) Successful in 18s
Asteria Qt CI / release (push) Successful in 8s

Previously, the release job and the macOS DMG release-attachment step
gated on `github.event_name == 'push'`, which caused manual Gitea UI
runs (`workflow_dispatch`) on `master` to skip creating the release,
uploading assets, and bumping `VERSION` after all builds succeeded.

Update the condition in `.gitea/workflows/ci.yml` (and document it in
`AGENTS.md`) so `master` runs triggered by either `push` or
`workflow_dispatch` (when `rebuild_images` is false) execute the
release flow while preserving `success()` gating on upstream packaging
jobs and keeping PRs, feature branches, and image-rebuild runs
isolated.
This commit is contained in:
Agel committed 2026-11-23 19:50:24 +01:00
1 parent b05a2fecf8
commit 9f82561098
2 files changed
+3 -3

No files matched your search

+2 -2
View File
@@ -340,7 +340,7 @@ jobs:
path: dist-macos/Asteria.dmg path: dist-macos/Asteria.dmg
retention-days: 1 retention-days: 1
- name: Attach DMG if master release already exists - name: Attach DMG if master release already exists
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} if: ${{ (github.ref == 'refs/heads/master' || github.ref_name == 'master') && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && !inputs.rebuild_images)) }}
continue-on-error: true continue-on-error: true
env: env:
BUILD_TOKEN: ${{ secrets.BUILD_TOKEN }} BUILD_TOKEN: ${{ secrets.BUILD_TOKEN }}
@@ -350,7 +350,7 @@ jobs:
# ── Publish Gitea Release, attach binaries, and bump VERSION (master only) ─── # ── Publish Gitea Release, attach binaries, and bump VERSION (master only) ───
release: release:
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }} if: ${{ success() && (github.ref == 'refs/heads/master' || github.ref_name == 'master') && (github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && !inputs.rebuild_images)) }}
needs: needs:
- package-linux - package-linux
- package-linux-arm64 - package-linux-arm64
+1 -1
View File
@@ -162,7 +162,7 @@ scripts/start-runner-macos.sh
- **On feature branches**: Outputs a SemVer 2.0.0 pre-release string `MAJOR.MINOR.PATCH-<sanitized-branch>.<short-sha>` (e.g., `0.1.2-fix-epub.62c08ac`). - **On feature branches**: Outputs a SemVer 2.0.0 pre-release string `MAJOR.MINOR.PATCH-<sanitized-branch>.<short-sha>` (e.g., `0.1.2-fix-epub.62c08ac`).
- **Build & Metadata Propagation**: `CMakeLists.txt` resolves `ASTERIA_VERSION` (or accepts `-DASTERIA_VERSION=...`), populates `PROJECT_VERSION`, `ASTERIA_VERSION_STRING`, `QApplication::applicationVersion()`, `AppInfo.version`, macOS bundle `Info.plist` (`CFBundleShortVersionString` / `CFBundleVersion`), and Windows `VS_VERSION_INFO` via `src/asteria.rc.in`. - **Build & Metadata Propagation**: `CMakeLists.txt` resolves `ASTERIA_VERSION` (or accepts `-DASTERIA_VERSION=...`), populates `PROJECT_VERSION`, `ASTERIA_VERSION_STRING`, `QApplication::applicationVersion()`, `AppInfo.version`, macOS bundle `Info.plist` (`CFBundleShortVersionString` / `CFBundleVersion`), and Windows `VS_VERSION_INFO` via `src/asteria.rc.in`.
- **CI Isolation, Gitea Releases & Auto-Bump (`.gitea/workflows/ci.yml`, `scripts/bump-version.sh`)**: - **CI Isolation, Gitea Releases & Auto-Bump (`.gitea/workflows/ci.yml`, `scripts/bump-version.sh`)**:
- `release` runs strictly on `push` to `master` (never on PRs or feature branches), using the `BUILD_TOKEN` org secret (`write:repository`, `write:package`). - `release` runs strictly on `master` (`push` or manual `workflow_dispatch` with `rebuild_images=false`, never on PRs or feature branches), using the `BUILD_TOKEN` org secret (`write:repository`, `write:package`).
- At the end of a successful `master` pipeline, `release` runs `scripts/bump-version.sh --assets-dir dist`: - At the end of a successful `master` pipeline, `release` runs `scripts/bump-version.sh --assets-dir dist`:
1. Creates release tag `vX.Y.Z` and a Gitea Release at `GITHUB_SHA` via `/api/v1/repos/Asteria/asteria-qt/releases` (if absent). 1. Creates release tag `vX.Y.Z` and a Gitea Release at `GITHUB_SHA` via `/api/v1/repos/Asteria/asteria-qt/releases` (if absent).
2. Uploads packaged binaries (`Asteria-x86_64.AppImage.tar.gz`, `Asteria-arm64.AppImage.tar.gz`, `asteria-qt-windows-x86_64.zip`, `asteria-qt-windows-arm64.zip`, and `Asteria.dmg` when the optional `macos-qt` runner is active) as release assets. 2. Uploads packaged binaries (`Asteria-x86_64.AppImage.tar.gz`, `Asteria-arm64.AppImage.tar.gz`, `asteria-qt-windows-x86_64.zip`, `asteria-qt-windows-arm64.zip`, and `Asteria.dmg` when the optional `macos-qt` runner is active) as release assets.