-
Notifications
You must be signed in to change notification settings - Fork 8
37 lines (32 loc) · 1.06 KB
/
push-main.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:
- "v*.*.*"
jobs:
build-and-release:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: setup-repos
uses: actions/checkout@v3
- name: setup-go
uses: actions/setup-go@v4
- name: cross-platform-build
run: |
mkdir ./builds/
env GOARCH=arm64
env GOOS=linux go build -o ./builds/tinyfeed_linux_arm64
env GOOS=freebsd go build -o ./builds/tinyfeed_freebsd_arm64
env GOOS=darwin go build -o ./builds/tinyfeed_darwin_arm64
env GOOS=windows go build -o ./builds/tinyfeed_windows_arm64
env GOARCH=amd64
env GOOS=linux go build -o ./builds/tinyfeed_linux_amd64
env GOOS=freebsd go build -o ./builds/tinyfeed_freebsd_amd64
env GOOS=darwin go build -o ./builds/tinyfeed_darwin_amd64
env GOOS=windows go build -o ./builds/tinyfeed_windows_amd64
- name: release
uses: ncipollo/release-action@v1
with:
artifacts: "./builds/*"