chore: cleanup release.yaml

This commit is contained in:
koru 2026-06-13 15:12:38 +00:00 committed by nekohepott
parent 04e3749434
commit 389dbeff56
No known key found for this signature in database

View File

@ -3,7 +3,7 @@ name: Build and Release
on:
push:
tags:
- 'v*'
- "v*"
jobs:
build:
@ -15,7 +15,7 @@ jobs:
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 'stable'
go-version: "stable"
- name: Install dependencies
run: |
@ -38,16 +38,17 @@ jobs:
REPO="${{ github.repository }}"
TOKEN="${{ secrets.GITHUB_TOKEN }}"
ASSET="gogofetch-${TAG}-linux-amd64.tar.gz"
RELEASE_ID=$(curl -X POST "${{ github.server_url }}/api/v1/repos/${REPO}/releases" \
-H "Authorization: token ${TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"tag_name\":\"${TAG}\",\"target_commitish\":\"master\",\"name\":\"Release ${TAG}\",\"body\":\"Automated binary release for Arch Linux AUR\",\"draft\":false,\"prerelease\":false}" \
| jq '.id')
echo "Created release with ID: ${RELEASE_ID}"
curl -X POST "${{ github.server_url }}/api/v1/repos/${REPO}/releases/${RELEASE_ID}/assets" \
-H "Authorization: token ${TOKEN}" \
-H "Accept: application/json" \
-F "attachment=@./${ASSET}"
-F "attachment=@./${ASSET}"