-
Notifications
You must be signed in to change notification settings - Fork 11
50 lines (43 loc) · 1.2 KB
/
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
38
39
40
41
42
43
44
45
46
47
48
49
50
name: release
on:
push:
tags:
- "v*"
workflow_dispatch:
permissions:
contents: write
jobs:
binary:
name: Binary
runs-on: ubuntu-latest
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/v')
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Build
run: |
GOOS=linux GOARCH=amd64 make ndnd
mv ndnd ndnd-linux-amd64
GOOS=linux GOARCH=arm64 make ndnd
mv ndnd ndnd-linux-aarch64
GOOS=darwin GOARCH=amd64 make ndnd
mv ndnd ndnd-macos-amd64
GOOS=darwin GOARCH=arm64 make ndnd
mv ndnd ndnd-macos-aarch64
GOOS=windows GOARCH=amd64 make ndnd
mv ndnd ndnd-windows-amd64.exe
GOOS=windows GOARCH=arm64 make ndnd
mv ndnd ndnd-windows-aarch64.exe
- name: Upload to releases
uses: svenstaro/upload-release-action@v2
id: attach_to_release
with:
file: ndnd-*
file_glob: true
tag: ${{ github.ref }}
overwrite: true
make_latest: true