feat: enhance release workflow with Arch Linux native build and AUR update options

This commit is contained in:
2026-05-28 00:13:01 +08:00
parent 73b6ce903e
commit c59d6de54f

View File

@@ -10,9 +10,17 @@ on:
description: "Tag to build (e.g. v0.6.7)" description: "Tag to build (e.g. v0.6.7)"
required: true required: true
run_linux: run_linux:
description: "Build Linux" description: "Build Linux (.deb, .rpm, .snap, binaries)"
type: boolean type: boolean
default: true default: true
run_arch_native:
description: "Build Arch Linux Native (.pkg.tar.zst)"
type: boolean
default: true
run_aur:
description: "Update AUR packages (dcr & dcr-bin)"
type: boolean
default: false
run_bsd: run_bsd:
description: "Build BSD" description: "Build BSD"
type: boolean type: boolean
@@ -396,7 +404,7 @@ jobs:
# ── Arch Linux Native Package (.pkg.tar.zst) ─────────────────────────────── # ── Arch Linux Native Package (.pkg.tar.zst) ───────────────────────────────
build-arch-package: build-arch-package:
if: ${{ github.event_name == 'push' || github.event.inputs.run_linux == 'true' }} if: ${{ github.event_name == 'push' || github.event.inputs.run_arch_native == 'true' }}
needs: [setup, notes] needs: [setup, notes]
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
@@ -467,7 +475,7 @@ jobs:
# ── Arch User Repository (dcr) ─────────────────────────────────── # ── Arch User Repository (dcr) ───────────────────────────────────
publish-aur: publish-aur:
if: "!contains(github.ref_name, '-')" if: ${{ (github.event_name == 'push' && needs.setup.outputs.prerelease == 'false') || github.event.inputs.run_aur == 'true' }}
needs: [setup] needs: [setup]
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment: aur environment: aur
@@ -579,8 +587,7 @@ jobs:
# ── Arch User Repository (dcr-bin) ──────────────────────────────── # ── Arch User Repository (dcr-bin) ────────────────────────────────
publish-aur-bin: publish-aur-bin:
if: "!contains(github.ref_name, '-')" if: ${{ (github.event_name == 'push' && needs.setup.outputs.prerelease == 'false') || github.event.inputs.run_aur == 'true' }}
# Ждем сборку линукса, чтобы бинарник гарантированно лежал в релизах
needs: [setup, build-linux] needs: [setup, build-linux]
runs-on: ubuntu-latest runs-on: ubuntu-latest
environment: aur environment: aur
@@ -677,7 +684,6 @@ jobs:
git commit -m "dcr-bin ${{ needs.setup.outputs.version }}" git commit -m "dcr-bin ${{ needs.setup.outputs.version }}"
git push git push
# ── crates.io ────────────────────────────────────────────────────────────── # ── crates.io ──────────────────────────────────────────────────────────────
publish-crates: publish-crates:
if: | if: |