Retarget GoReleaser to publish to Gitea (gitea_urls, release.gitea, changelog.use: gitea). Add Gitea Actions workflows for build/test, release, and benchmarks — adapted from GitHub equivalents with macOS jobs and SLSA provenance dropped. Old .github/workflows/ kept in place.
63 lines
1.6 KiB
YAML
63 lines
1.6 KiB
YAML
name: Release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- "v*"
|
|
|
|
run-name: "Release ${{ github.ref_name }}"
|
|
|
|
jobs:
|
|
goreleaser:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- name: Set up Go
|
|
uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
|
|
- name: Run GoReleaser
|
|
uses: goreleaser/goreleaser-action@v6
|
|
with:
|
|
distribution: goreleaser
|
|
version: "~> v2"
|
|
args: release --clean
|
|
env:
|
|
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
GORELEASER_FORCE_TOKEN: gitea
|
|
|
|
publish-version:
|
|
needs: [goreleaser]
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout gh-pages
|
|
uses: actions/checkout@v4
|
|
with:
|
|
ref: gh-pages
|
|
|
|
- name: Update latest version
|
|
run: |
|
|
echo "${{ github.ref_name }}" > latest.txt
|
|
|
|
cat > latest.json << EOF
|
|
{
|
|
"version": "${{ github.ref_name }}",
|
|
"published_at": "$(date -u +%Y-%m-%dT%H:%M:%SZ)",
|
|
"url": "https://gitea.app.monadical.io/monadical/greywall/releases/tag/${{ github.ref_name }}"
|
|
}
|
|
EOF
|
|
|
|
- name: Commit and push to gh-pages
|
|
run: |
|
|
git config user.name "gitea-actions[bot]"
|
|
git config user.email "gitea-actions[bot]@noreply.gitea.app.monadical.io"
|
|
git add latest.txt latest.json
|
|
git commit -m "Update latest version to ${{ github.ref_name }}" || echo "No changes to commit"
|
|
git push origin gh-pages
|