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.
This commit is contained in:
@@ -24,6 +24,7 @@ Two workflows, triggered by different events:
|
||||
```text
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user