Adds a shared workflow that runs an arbitrary make target and publishes the output via sftp-push on tag pushes, plus an example consumer. Also fills in real example values for go-release.yml's inputs in the existing example consumer. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
26 lines
838 B
YAML
26 lines
838 B
YAML
# Example: how a repo consumes the shared actions.
|
|
# Put this in your-repo/.gitea/workflows/release.yml
|
|
|
|
name: Release
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
tags: ["v*"]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
jobs:
|
|
release:
|
|
uses: jchenry/gitea-actions/.gitea/workflows/go-release.yml@main
|
|
with:
|
|
app-name: your-app-name # required, no default
|
|
go-version: "1.25" # optional, default "1.25"
|
|
main-package: "./cmd/yourapp" # optional, default "."
|
|
include-staticcheck: true # optional, default false
|
|
artifact-dest: /srv/artifacts/your-app-name/${{ github.ref_name }} # optional, default "" (skips publish job)
|
|
secrets:
|
|
ARTIFACT_HOST: ${{ secrets.ARTIFACT_HOST }}
|
|
ARTIFACT_USER: ${{ secrets.ARTIFACT_USER }}
|
|
ARTIFACT_KEY: ${{ secrets.ARTIFACT_KEY }}
|