mirror of
https://github.com/sysadminsmedia/homebox.git
synced 2025-12-21 13:23:14 +01:00
67 lines
1.7 KiB
YAML
67 lines
1.7 KiB
YAML
name: Publish Release Binaries
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
tags: [ 'v*.*.*' ]
|
|
|
|
jobs:
|
|
goreleaser:
|
|
name: goreleaser
|
|
runs-on: ubuntu-latest
|
|
permissions:
|
|
contents: write
|
|
packages: write
|
|
id-token: write
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version: "1.24"
|
|
cache-dependency-path: backend/go.mod
|
|
|
|
- uses: pnpm/action-setup@v2
|
|
with:
|
|
version: 9.15.3
|
|
|
|
- name: Build Frontend and Copy to Backend
|
|
working-directory: frontend
|
|
run: |
|
|
pnpm install
|
|
pnpm run build
|
|
cp -r ./.output/public ../backend/app/api/static/
|
|
|
|
- name: Install CoSign
|
|
working-directory: backend
|
|
run: |
|
|
go install github.com/sigstore/cosign/cmd/cosign@latest
|
|
|
|
- name: Run GoReleaser
|
|
if: startsWith(github.ref, 'refs/tags/')
|
|
uses: goreleaser/goreleaser-action@v5
|
|
with:
|
|
workdir: "backend"
|
|
distribution: goreleaser
|
|
version: "~> v2"
|
|
args: release --clean --yes
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
COSIGN_PWD: ${{ secrets.COSIGN_PWD }}
|
|
|
|
- name: Run GoReleaser No Publish
|
|
if: !startsWith(github.ref, 'refs/tags/')
|
|
uses: goreleaser/goreleaser-action@v5
|
|
with:
|
|
workdir: "backend"
|
|
distribution: goreleaser
|
|
version: "~> v2"
|
|
args: release --clean --skip=publish,validate --yes
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
COSIGN_PWD: ${{ secrets.COSIGN_PWD }}
|
|
COSIGN_YES: "true" |