-
Notifications
You must be signed in to change notification settings - Fork 7
178 lines (168 loc) · 5.58 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
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
on:
release:
types: [created]
name: Release
jobs:
build_and_test:
if: contains(github.ref,'latest') == false
runs-on: macos-latest
steps:
- uses: actions/setup-node@v3
with:
node-version: 18
- uses: actions/checkout@v2
- name: Get release
id: get_release
uses: bruceadams/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
- name: "change version"
uses: dmikey/[email protected]
with:
version: ${{ steps.get_release.outputs.tag_name }}
package: "./"
- run: npm i -g yarn
- run: yarn
- run: yarn build
- run: yarn build:arm
- name: Archive Release
uses: thedoctor0/zip-release@main
with:
type: "tar"
filename: bls-linux-x64-blockless-cli.tar.gz
path: bls_x64-linux*
- name: Archive Release
uses: thedoctor0/zip-release@main
with:
type: "tar"
filename: bls-windows-x64-blockless-cli.tar.gz
path: bls_x64-win*
- name: Archive Release
uses: thedoctor0/zip-release@main
with:
type: "tar"
filename: bls-macos-x64-blockless-cli.tar.gz
path: bls_x64-macos*
- name: Archive Release
uses: thedoctor0/zip-release@main
with:
type: "tar"
filename: bls-linux-arm64-blockless-cli.tar.gz
path: bls_arm64-linux*
- name: Archive Release
uses: thedoctor0/zip-release@main
with:
type: "tar"
filename: bls-windows-arm64-blockless-cli.tar.gz
path: bls_arm64-win*
- name: Archive Release
uses: thedoctor0/zip-release@main
with:
type: "tar"
filename: bls-macos-arm64-blockless-cli.tar.gz
path: bls_arm64-macos*
- name: upload artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: bls-macos-arm64-blockless-cli.tar.gz
asset_name: bls-macos-arm64-blockless-cli.tar.gz
asset_content_type: application/gzip
- name: upload artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: bls-linux-arm64-blockless-cli.tar.gz
asset_name: bls-linux-arm64-blockless-cli.tar.gz
asset_content_type: application/gzip
- name: upload artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: bls-windows-arm64-blockless-cli.tar.gz
asset_name: bls-windows-arm64-blockless-cli.tar.gz
asset_content_type: application/gzip
- name: upload artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: bls-macos-x64-blockless-cli.tar.gz
asset_name: bls-macos-x64-blockless-cli.tar.gz
asset_content_type: application/gzip
- name: upload artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: bls-linux-x64-blockless-cli.tar.gz
asset_name: bls-linux-x64-blockless-cli.tar.gz
asset_content_type: application/gzip
- name: upload artifact
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ github.token }}
with:
upload_url: ${{ steps.get_release.outputs.upload_url }}
asset_path: bls-windows-x64-blockless-cli.tar.gz
asset_name: bls-windows-x64-blockless-cli.tar.gz
asset_content_type: application/gzip
- uses: actions/upload-artifact@v3
with:
path: bls-windows-x64-blockless-cli.tar.gz
retention-days: 1
- uses: actions/upload-artifact@v3
with:
path: bls-linux-x64-blockless-cli.tar.gz
retention-days: 1
- uses: actions/upload-artifact@v3
with:
path: bls-macos-x64-blockless-cli.tar.gz
retention-days: 1
- uses: actions/upload-artifact@v3
with:
path: bls-windows-arm64-blockless-cli.tar.gz
retention-days: 1
- uses: actions/upload-artifact@v3
with:
path: bls-linux-arm64-blockless-cli.tar.gz
retention-days: 1
- uses: actions/upload-artifact@v3
with:
path: bls-macos-arm64-blockless-cli.tar.gz
retention-days: 1
delete_latest:
needs: build_and_test
runs-on: ubuntu-latest
steps:
- name: Delete the "latest" Release
uses: dev-drprasad/[email protected]
with:
tag_name: latest
delete_release: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
update_latest:
needs: delete_latest
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
path: .
- name: Publish the Release
uses: softprops/action-gh-release@v1
with:
tag_name: latest
files: artifact/*
prerelease: true
fail_on_unmatched_files: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}