-
Notifications
You must be signed in to change notification settings - Fork 38
101 lines (93 loc) · 4.17 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
---
name: release
on:
push:
branches:
- main
jobs:
release:
concurrency: main
name: release
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
id: release
with:
release-type: go
package-name: runpodctl
pull-request-title-pattern: release${component} ${version}
- uses: actions/checkout@v2
if: ${{ steps.release.outputs.release_created }}
- uses: actions/setup-go@v2
if: ${{ steps.release.outputs.release_created }}
with:
go-version: 1.17
- name: build
if: ${{ steps.release.outputs.release_created }}
run: |
env GOOS=linux GOARCH=amd64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpodctl-linux-amd64 .
env GOOS=darwin GOARCH=amd64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpodctl-darwin-amd64 .
env GOOS=darwin GOARCH=arm64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpodctl-darwin-arm64 .
env GOOS=windows GOARCH=amd64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpodctl-windows-amd64.exe .
# env GOOS=linux GOARCH=arm64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpodctl-linux-arm64 .
# env GOOS=android GOARCH=amd64 go build -ldflags "-X 'main.Version=${{ steps.release.outputs.tag_name }}'" -o bin/runpodctl-android-amd64 .
- name: upload linux amd64 release binary
if: ${{ steps.release.outputs.release_created }}
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: bin/runpodctl-linux-amd64
asset_name: runpodctl-linux-amd64
asset_content_type: application/octet-stream
- name: upload darwin amd64 release binary
if: ${{ steps.release.outputs.release_created }}
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: bin/runpodctl-darwin-amd64
asset_name: runpodctl-darwin-amd64
asset_content_type: application/octet-stream
- name: upload darwin arm64 release binary
if: ${{ steps.release.outputs.release_created }}
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: bin/runpodctl-darwin-arm64
asset_name: runpodctl-darwin-arm64
asset_content_type: application/octet-stream
- name: upload windows amd64 release binary
if: ${{ steps.release.outputs.release_created }}
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: bin/runpodctl-windows-amd64.exe
asset_name: runpodctl-windows-amd64.exe
asset_content_type: application/octet-stream
# - name: upload linux arm64 release binary
# if: ${{ steps.release.outputs.release_created }}
# uses: actions/[email protected]
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# upload_url: ${{ steps.release.outputs.upload_url }}
# asset_path: bin/runpodctl-linux-arm64
# asset_name: runpodctl-linux-arm64
# asset_content_type: application/octet-stream
# - name: upload android amd64 release binary
# if: ${{ steps.release.outputs.release_created }}
# uses: actions/[email protected]
# env:
# GITHUB_TOKEN: ${{ github.token }}
# with:
# upload_url: ${{ steps.release.outputs.upload_url }}
# asset_path: bin/runpodctl-android-amd64
# asset_name: runpodctl-android-amd64
# asset_content_type: application/octet-stream