-
Notifications
You must be signed in to change notification settings - Fork 27
37 lines (35 loc) · 1002 Bytes
/
release.yml
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
name: Build and Release
on:
push:
tags:
- "*"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
matrix:
goos: [linux, darwin]
goarch: [amd64, arm64]
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.23
- name: Build
run: |
GOOS=${{ matrix.goos }} GOARCH=${{ matrix.goarch }} go build -o boring ./cmd/boring
- name: Compress Binary
run: |
tar -czvf boring-${{ github.ref_name }}-${{ matrix.goos }}-${{ matrix.goarch }}.tar.gz boring
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: boring-*.tar.gz
file_glob: true
tag: ${{ github.ref }}
body: "Automatic build release for version ${{ github.ref_name }}"