-
Notifications
You must be signed in to change notification settings - Fork 0
40 lines (37 loc) · 1.39 KB
/
release.yml
File metadata and controls
40 lines (37 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
build-linux:
runs-on: ubuntu-24.04
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: "^1.23.0"
- id: get-version
run: |
echo "version=$(echo ${{github.ref_name}} | cut -c2-)" >> $GITHUB_OUTPUT
- name: Build tool
id: build
run: |
GOOS=linux GOARCH=amd64 go build -o github-release-sync
tar -zcvf "github-release-sync-${{ steps.get-version.outputs.version }}-linux-amd64.tar.gz" github-release-sync
GOOS=linux GOARCH=386 go build -o github-release-sync
tar -zcvf "github-release-sync-${{ steps.get-version.outputs.version }}-linux-i386.tar.gz" github-release-sync
GOOS=linux GOARCH=arm64 go build -o github-release-sync
tar -zcvf "github-release-sync-${{ steps.get-version.outputs.version }}-linux-arm64.tar.gz" github-release-sync
GOOS=linux GOARCH=loong64 go build -o github-release-sync
tar -zcvf "github-release-sync-${{ steps.get-version.outputs.version }}-linux-loong64.tar.gz" github-release-sync
- name: Release
uses: softprops/action-gh-release@v2
with:
prerelease: true
tag_name: ${{github.ref_name}}
files: |
github-release-sync-*.tar.gz