Files
vault-tui/.gitea/workflows/release.yml
T
f.weber 333c7468e9
Test / testing (push) Successful in 5m30s
Release / build-and-upload (release) Failing after 9m9s
feat: add Homebrew and Scoop publishing scripts, enhance versioning metadata
2026-08-14 11:35:52 +02:00

59 lines
1.8 KiB
YAML

name: Release
on:
release:
types: [published]
permissions:
contents: write
jobs:
build-and-upload:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
ref: ${{ gitea.ref }}
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Test
run: make test
- name: Build all artifacts (default + cloud, all platforms)
env:
VERSION: ${{ gitea.event.release.tag_name }}
PRERELEASE: ${{ gitea.event.release.prerelease }}
run: |
make release VERSION="$VERSION" PRERELEASE="$PRERELEASE"
make release-cloud VERSION="$VERSION" PRERELEASE="$PRERELEASE"
- name: Upload artifacts to release
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
api="${{ gitea.server_url }}/api/v1/repos/${{ gitea.repository }}/releases/${{ gitea.event.release.id }}/assets"
for f in dist/*; do
name="$(basename "$f")"
echo "uploading $name"
curl --fail -sS -X POST \
-H "Authorization: token ${GITEA_TOKEN}" \
-F "attachment=@${f};filename=${name}" \
"${api}?name=${name}"
done
# Homebrew/Linuxbrew tap + Scoop bucket: only for stable releases —
# a prerelease shouldn't become what `brew install`/`scoop install`
# resolve to by default. See .gitea/scripts/publish-tap.sh.
- name: Publish Homebrew/Scoop tap
if: gitea.event.release.prerelease != true
env:
VERSION: ${{ gitea.event.release.tag_name }}
TAP_TOKEN: ${{ secrets.TAP_TOKEN }}
run: .gitea/scripts/publish-tap.sh