Gitea Actions: workflow guards + .gitea release pipeline (#7)
* CI: skip GitHub-specific workflows on Gitea Actions; add workflow_dispatch Gitea reads .github/workflows/ for compatibility, so without guards it tries to run the release and wiki-sync workflows on Gitea too - which fail because they use softprops/action-gh-release@v2 (GitHub-only) and push to GitHub-hosted wiki URLs. Add `if: github.server_url == 'https://github.com'` to the release-builder and wiki-sync jobs so Gitea no-ops them. ci.yml (plain dotnet build + test) still runs on both, and now also accepts workflow_dispatch so it can be triggered by hand to verify a self- hosted runner is picking up jobs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> * Gitea release workflow: build installer + attach to Gitea release .gitea/workflows/release.yml runs on the self-hosted Windows runner when a v* tag is pushed (or via workflow_dispatch with a version override for testing without bumping the project). Mirrors the GitHub release workflow shape - dotnet test, choco-install Inno Setup if missing, run scripts/build-installer.ps1 - then uses Gitea's REST API directly for the release-creation + asset-upload steps (Gitea has no equivalent to softprops/action-gh-release). Token is the runner-injected secrets.GITHUB_TOKEN, which Gitea provides for GitHub Actions compatibility. Path location matters: lives under .gitea/ so GitHub Actions never sees it, while the existing .github/workflows/release.yml stays GitHub-only (already gated with `if: github.server_url == ...`). Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -5,6 +5,7 @@ on:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
@@ -12,6 +12,9 @@ on:
|
||||
|
||||
jobs:
|
||||
build-installer:
|
||||
# Gitea reads .github/workflows/ for compatibility, but the create-release
|
||||
# step uses a GitHub-only action. Skip the whole job on non-GitHub runners.
|
||||
if: github.server_url == 'https://github.com'
|
||||
runs-on: windows-latest
|
||||
permissions:
|
||||
contents: write # needed to create releases / upload assets
|
||||
|
||||
@@ -11,6 +11,10 @@ on:
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
# Gitea reads .github/workflows/ for compatibility, but this workflow
|
||||
# pushes to a GitHub-hosted wiki. Skip on non-GitHub runners; the Gitea
|
||||
# wiki is synced separately via scripts/sync-wiki.ps1.
|
||||
if: github.server_url == 'https://github.com'
|
||||
runs-on: windows-latest
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
Reference in New Issue
Block a user