-
Notifications
You must be signed in to change notification settings - Fork 1
77 lines (53 loc) · 2.11 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Release
on:
push:
branches:
- main
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
release-please:
name: Maintain Upcoming Release
runs-on: ubuntu-latest
steps:
- uses: googleapis/release-please-action@v4
id: release
with:
token: ${{ secrets.RELEASE_PLEASE_TOKEN }}
config-file: release-please-config.json
manifest-file: .release-please-manifest.json
- if: ${{ steps.release.outputs.release_created }}
uses: actions/checkout@v4
- name: Set up Go
if: ${{ steps.release.outputs.release_created }}
uses: actions/setup-go@v5
with:
go-version-file: 'go.mod'
- if: ${{ steps.release.outputs.release_created }}
run: go version
- name: Build dutctl for amd64
if: ${{ steps.release.outputs.release_created }}
run: GOOS=linux GOARCH=amd64 go build -o dutctl-linux-amd64 ./cmds/dutctl
- name: Build dutagent for amd64
if: ${{ steps.release.outputs.release_created }}
run: GOOS=linux GOARCH=amd64 go build -o dutagent-linux-amd64 ./cmds/dutctl
- name: Build dutagent for arm64
if: ${{ steps.release.outputs.release_created }}
run: GOOS=linux GOARCH=arm64 go build -o dutagent-linux-arm64 ./cmds/dutctl
- name: Upload dutctl-linux-amd64
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ steps.release.outputs.tag_name }} ./dutctl-linux-amd64
- name: Upload dutagent-linux-amd64
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ steps.release.outputs.tag_name }} ./dutagent-linux-amd64
- name: Upload dutagent-linux-arm64
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload ${{ steps.release.outputs.tag_name }} ./dutagent-linux-arm64