This repository has been archived by the owner on Sep 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 245
137 lines (118 loc) · 6.23 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
name: Release
on:
create:
tags:
- v*
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout source
uses: actions/checkout@v1
- name: Use Golang
uses: actions/setup-go@v1
with:
go-version: "1.13.x"
-
name: Build with xgo
uses: crazy-max/ghaction-xgo@v1
with:
xgo_version: latest
go_version: ${{ matrix.go_version }}
dest: build
prefix: myapp
targets: windows/amd64,windows/386,linux/386,linux/amd64,linux/arm,linux/arm64,darwin/amd64
v: true
x: false
race: false
ldflags: -s -w
buildmode: default
- name: Build zip
run: |
mv build/myapp-windows*386.exe pocassist_windows_386.exe
mv build/myapp-windows*amd64.exe pocassist_windows_amd64.exe
mv build/myapp-linux-*386 pocassist_linux_386
mv build/myapp-linux-*amd64 pocassist_linux_amd64
mv build/myapp-linux-*arm64 pocassist_linux_arm64
mv build/myapp-linux-*arm-* pocassist_linux_arm
mv build/myapp-darwin-*amd64 pocassist_darwin_amd64
zip pocassist_windows_386.zip pocassist_windows_386.exe
zip pocassist_windows_amd64.zip pocassist_windows_amd64.exe
zip pocassist_linux_386.zip pocassist_linux_386
zip pocassist_linux_amd64.zip pocassist_linux_amd64
zip pocassist_linux_arm64.zip pocassist_linux_arm64
zip pocassist_linux_arm.zip pocassist_linux_arm
zip pocassist_darwin_amd64.zip pocassist_darwin_amd64
- name: Create Release
id: create_release
uses: monkeyWie/create-release@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Release ${{ github.ref }}
draft: false
prerelease: true
- name: Upload Release - Windows amd64
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./pocassist_windows_amd64.zip
asset_name: pocassist_windows_amd64.zip
asset_content_type: application/zip
- name: Upload Release - Windows 386
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./pocassist_windows_386.zip
asset_name: pocassist_windows_386.zip
asset_content_type: application/zip
- name: Upload Release - Linux amd64
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./pocassist_linux_amd64.zip
asset_name: pocassist_linux_amd64.zip
asset_content_type: application/zip
- name: Upload Release - Linux 386
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./pocassist_linux_386.zip
asset_name: pocassist_linux_386.zip
asset_content_type: application/zip
- name: Upload Release - Linux arm64
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./pocassist_linux_arm64.zip
asset_name: pocassist_linux_arm64.zip
asset_content_type: application/zip
- name: Upload Release - Linux arm
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./pocassist_linux_arm.zip
asset_name: pocassist_linux_arm.zip
asset_content_type: application/zip
- name: Upload Release - Darwin amd64
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ./pocassist_darwin_amd64.zip
asset_name: pocassist_darwin_amd64.zip
asset_content_type: application/zip