From b5ed703108a3133b16d94040919781e0c6f3bfd7 Mon Sep 17 00:00:00 2001 From: "dolgolyov.alexei" Date: Fri, 27 Mar 2026 23:41:09 +0300 Subject: [PATCH] docs: add manual build workflow section (6.2) Describes a workflow_dispatch-triggered build.yml that produces CI artifacts without creating a Gitea release. Useful for testing builds before tagging. --- gitea-python-ci-cd.md | 64 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 63 insertions(+), 1 deletion(-) diff --git a/gitea-python-ci-cd.md b/gitea-python-ci-cd.md index 01f9662..10738c8 100644 --- a/gitea-python-ci-cd.md +++ b/gitea-python-ci-cd.md @@ -22,8 +22,9 @@ A reusable reference for building CI pipelines, release automation, and installe Two workflows, triggered by different events: ```text -push/PR to master ──► test.yml (lint + test) +push/PR to master ──► test.yml (lint + test) push tag v* ──► release.yml (build + release + Docker) +manual trigger ──► build.yml (build artifacts only, no release) ``` ## 1. Lint & Test Workflow @@ -506,6 +507,67 @@ Build: `makensis -DVERSION="${VERSION}" installer.nsi` Sign the `.exe` after `makensis` but before uploading assets to avoid SmartScreen and browser download warnings. See [windows-code-signing.md](windows-code-signing.md) for signing options and CI integration examples. +### 6.2. Build Without Release (Manual Trigger) + +A separate workflow that builds installers and artifacts on demand, without creating a Gitea release. Useful for testing builds before tagging, verifying installer changes, or grabbing a dev build. + +```yaml +# .gitea/workflows/build.yml +name: Build Artifacts + +on: + workflow_dispatch: + inputs: + version: + description: 'Version label (e.g. dev, 0.3.0-test)' + required: false + default: 'dev' + +jobs: + build-windows: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Build Windows distribution + run: bash build-dist-windows.sh "${{ inputs.version }}" + + - name: Build NSIS installer + run: makensis -DVERSION="${{ inputs.version }}" installer.nsi + + - uses: actions/upload-artifact@v4 + with: + name: windows-installer + path: build/*.exe + + - uses: actions/upload-artifact@v4 + with: + name: windows-portable + path: build/*.zip + + build-linux: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - name: Build Linux distribution + run: bash build-dist.sh "${{ inputs.version }}" + + - uses: actions/upload-artifact@v4 + with: + name: linux-tarball + path: build/*.tar.gz +``` + +**Key differences from `release.yml`:** + +- **No `create-release` job** — build jobs run independently +- **`actions/upload-artifact`** instead of Gitea release API — artifacts are downloadable from the workflow run page +- **`workflow_dispatch`** — triggered manually from Gitea UI (Actions → Build Artifacts → Run) +- **Same build scripts** — `build-dist-windows.sh` and `build-dist.sh` accept the version as an argument + +> **Note:** `actions/upload-artifact` stores artifacts temporarily (default retention: 90 days). For permanent distribution, use the release workflow with a `v*` tag. + ## 7. Docker Build ### Multi-stage Dockerfile