chore: cleanup release.yaml
This commit is contained in:
parent
04e3749434
commit
389dbeff56
@ -3,7 +3,7 @@ name: Build and Release
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
tags:
|
tags:
|
||||||
- 'v*'
|
- "v*"
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
@ -15,7 +15,7 @@ jobs:
|
|||||||
- name: Set up Go
|
- name: Set up Go
|
||||||
uses: actions/setup-go@v5
|
uses: actions/setup-go@v5
|
||||||
with:
|
with:
|
||||||
go-version: 'stable'
|
go-version: "stable"
|
||||||
|
|
||||||
- name: Install dependencies
|
- name: Install dependencies
|
||||||
run: |
|
run: |
|
||||||
@ -38,16 +38,17 @@ jobs:
|
|||||||
REPO="${{ github.repository }}"
|
REPO="${{ github.repository }}"
|
||||||
TOKEN="${{ secrets.GITHUB_TOKEN }}"
|
TOKEN="${{ secrets.GITHUB_TOKEN }}"
|
||||||
ASSET="gogofetch-${TAG}-linux-amd64.tar.gz"
|
ASSET="gogofetch-${TAG}-linux-amd64.tar.gz"
|
||||||
|
|
||||||
RELEASE_ID=$(curl -X POST "${{ github.server_url }}/api/v1/repos/${REPO}/releases" \
|
RELEASE_ID=$(curl -X POST "${{ github.server_url }}/api/v1/repos/${REPO}/releases" \
|
||||||
-H "Authorization: token ${TOKEN}" \
|
-H "Authorization: token ${TOKEN}" \
|
||||||
-H "Content-Type: application/json" \
|
-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}" \
|
-d "{\"tag_name\":\"${TAG}\",\"target_commitish\":\"master\",\"name\":\"Release ${TAG}\",\"body\":\"Automated binary release for Arch Linux AUR\",\"draft\":false,\"prerelease\":false}" \
|
||||||
| jq '.id')
|
| jq '.id')
|
||||||
|
|
||||||
echo "Created release with ID: ${RELEASE_ID}"
|
echo "Created release with ID: ${RELEASE_ID}"
|
||||||
|
|
||||||
curl -X POST "${{ github.server_url }}/api/v1/repos/${REPO}/releases/${RELEASE_ID}/assets" \
|
curl -X POST "${{ github.server_url }}/api/v1/repos/${REPO}/releases/${RELEASE_ID}/assets" \
|
||||||
-H "Authorization: token ${TOKEN}" \
|
-H "Authorization: token ${TOKEN}" \
|
||||||
-H "Accept: application/json" \
|
-H "Accept: application/json" \
|
||||||
-F "attachment=@./${ASSET}"
|
-F "attachment=@./${ASSET}"
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user