Skip to content

Commit 7841021

Browse files
plebhashFi3
authored andcommitted
Specify version on filenames inside Release Bin CI (#939)
* patch release bin * get git tag * add comments about release branches * use sv2- on release binary names
1 parent f1a7de8 commit 7841021

File tree

2 files changed

+75
-52
lines changed

2 files changed

+75
-52
lines changed

.github/workflows/release-bin.yaml

Lines changed: 66 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,10 @@ jobs:
2020
with:
2121
toolchain: stable
2222
override: true
23-
23+
24+
- name: Set env
25+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
26+
2427
- name: Compile Native
2528
run: cargo build --release --locked --manifest-path=roles/pool/Cargo.toml
2629

@@ -49,44 +52,44 @@ jobs:
4952
with:
5053
repo_token: ${{ secrets.GITHUB_TOKEN }}
5154
file: roles/target/release/pool_sv2
52-
asset_name: pool_sv2-x86_64-linux-gnu
53-
tag: ${{ github.ref }}
55+
asset_name: pool-sv2-${{ env.RELEASE_VERSION }}-x86_64-linux-gnu
56+
tag: ${{ env.RELEASE_VERSION }}
5457

5558
- name: Upload MacOS x86-64 binaries to release
5659
if: matrix.os == 'macos-latest'
5760
uses: svenstaro/upload-release-action@v2
5861
with:
5962
repo_token: ${{ secrets.GITHUB_TOKEN }}
6063
file: roles/target/release/pool_sv2
61-
asset_name: pool_sv2-x86_64-apple-darwin
62-
tag: ${{ github.ref }}
64+
asset_name: pool-sv2-${{ env.RELEASE_VERSION }}-x86_64-apple-darwin
65+
tag: ${{ env.RELEASE_VERSION }}
6366

6467
- name: Upload Linux aarch64 binaries to release
6568
if: matrix.os == 'ubuntu-20.04'
6669
uses: svenstaro/upload-release-action@v2
6770
with:
6871
repo_token: ${{ secrets.GITHUB_TOKEN }}
6972
file: roles/target/aarch64-unknown-linux-gnu/release/pool_sv2
70-
asset_name: pool_sv2-aarch64-linux-gnu
71-
tag: ${{ github.ref }}
73+
asset_name: pool-sv2-${{ env.RELEASE_VERSION }}-aarch64-linux-gnu
74+
tag: ${{ env.RELEASE_VERSION }}
7275

7376
- name: Upload Linux ARM binaries to release
7477
if: matrix.os == 'ubuntu-20.04'
7578
uses: svenstaro/upload-release-action@v2
7679
with:
7780
repo_token: ${{ secrets.GITHUB_TOKEN }}
7881
file: roles/target/arm-unknown-linux-gnueabi/release/pool_sv2
79-
asset_name: pool_sv2-arm-linux-gnueabi
80-
tag: ${{ github.ref }}
82+
asset_name: pool-sv2-${{ env.RELEASE_VERSION }}-arm-linux-gnueabi
83+
tag: ${{ env.RELEASE_VERSION }}
8184

8285
- name: Upload MacOS ARM64 binaries to release
8386
if: matrix.os == 'macos-latest'
8487
uses: svenstaro/upload-release-action@v2
8588
with:
8689
repo_token: ${{ secrets.GITHUB_TOKEN }}
8790
file: roles/target/aarch64-apple-darwin/release/pool_sv2
88-
asset_name: pool_sv2-aarch64-apple-darwin
89-
tag: ${{ github.ref }}
91+
asset_name: pool-sv2-${{ env.RELEASE_VERSION }}-aarch64-apple-darwin
92+
tag: ${{ env.RELEASE_VERSION }}
9093

9194
release_jdc:
9295
runs-on: ${{ matrix.os }}
@@ -99,9 +102,11 @@ jobs:
99102
with:
100103
toolchain: stable
101104
override: true
102-
103105
- name: Compile Native
104106
run: cargo build --release --locked --manifest-path=roles/jd-client/Cargo.toml
107+
108+
- name: Set env
109+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
105110

106111
- name: Install cross
107112
run: cargo install cross
@@ -128,44 +133,44 @@ jobs:
128133
with:
129134
repo_token: ${{ secrets.GITHUB_TOKEN }}
130135
file: roles/target/release/jd_client
131-
asset_name: jd_client-x86_64-linux-gnu
132-
tag: ${{ github.ref }}
136+
asset_name: jd-client-sv2-${{ env.RELEASE_VERSION }}-x86_64-linux-gnu
137+
tag: ${{ env.RELEASE_VERSION }}
133138

134139
- name: Upload Linux aarch64 binaries to release
135140
if: matrix.os == 'ubuntu-20.04'
136141
uses: svenstaro/upload-release-action@v2
137142
with:
138143
repo_token: ${{ secrets.GITHUB_TOKEN }}
139144
file: roles/target/aarch64-unknown-linux-gnu/release/jd_client
140-
asset_name: jd_client-aarch64-linux-gnu
141-
tag: ${{ github.ref }}
145+
asset_name: jd-client-sv2-${{ env.RELEASE_VERSION }}-aarch64-linux-gnu
146+
tag: ${{ env.RELEASE_VERSION }}
142147

143148
- name: Upload Linux ARM binaries to release
144149
if: matrix.os == 'ubuntu-20.04'
145150
uses: svenstaro/upload-release-action@v2
146151
with:
147152
repo_token: ${{ secrets.GITHUB_TOKEN }}
148153
file: roles/target/arm-unknown-linux-gnueabi/release/jd_client
149-
asset_name: jd_client-arm-linux-gnueabi
150-
tag: ${{ github.ref }}
154+
asset_name: jd-client-sv2-${{ env.RELEASE_VERSION }}-arm-linux-gnueabi
155+
tag: ${{ env.RELEASE_VERSION }}
151156

152157
- name: Upload MacOS x86-64 binaries to release
153158
if: matrix.os == 'macos-latest'
154159
uses: svenstaro/upload-release-action@v2
155160
with:
156161
repo_token: ${{ secrets.GITHUB_TOKEN }}
157162
file: roles/target/release/jd_client
158-
asset_name: jd_client-x86_64-apple-darwin
159-
tag: ${{ github.ref }}
163+
asset_name: jd-client-sv2-${{ env.RELEASE_VERSION }}-x86_64-apple-darwin
164+
tag: ${{ env.RELEASE_VERSION }}
160165

161166
- name: Upload MacOS ARM64 binaries to release
162167
if: matrix.os == 'macos-latest'
163168
uses: svenstaro/upload-release-action@v2
164169
with:
165170
repo_token: ${{ secrets.GITHUB_TOKEN }}
166171
file: roles/target/aarch64-apple-darwin/release/jd_client
167-
asset_name: jd_client-aarch64-apple-darwin
168-
tag: ${{ github.ref }}
172+
asset_name: jd-client-sv2-${{ env.RELEASE_VERSION }}-aarch64-apple-darwin
173+
tag: ${{ env.RELEASE_VERSION }}
169174

170175
release_jds:
171176
runs-on: ${{ matrix.os }}
@@ -179,6 +184,9 @@ jobs:
179184
toolchain: stable
180185
override: true
181186

187+
- name: Set env
188+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
189+
182190
- name: Compile Native
183191
run: cargo build --release --locked --manifest-path=roles/jd-server/Cargo.toml
184192

@@ -207,44 +215,44 @@ jobs:
207215
with:
208216
repo_token: ${{ secrets.GITHUB_TOKEN }}
209217
file: roles/target/release/jd_server
210-
asset_name: jd_server-x86_64-linux-gnu
211-
tag: ${{ github.ref }}
218+
asset_name: jd-server-sv2-${{ env.RELEASE_VERSION }}-x86_64-linux-gnu
219+
tag: ${{ env.RELEASE_VERSION }}
212220

213221
- name: Upload Linux aarch64 binaries to release
214222
if: matrix.os == 'ubuntu-20.04'
215223
uses: svenstaro/upload-release-action@v2
216224
with:
217225
repo_token: ${{ secrets.GITHUB_TOKEN }}
218226
file: roles/target/aarch64-unknown-linux-gnu/release/jd_server
219-
asset_name: jd_server-aarch64-linux-gnu
220-
tag: ${{ github.ref }}
227+
asset_name: jd-server-sv2-${{ env.RELEASE_VERSION }}-aarch64-linux-gnu
228+
tag: ${{ env.RELEASE_VERSION }}
221229

222230
- name: Upload Linux ARM binaries to release
223231
if: matrix.os == 'ubuntu-20.04'
224232
uses: svenstaro/upload-release-action@v2
225233
with:
226234
repo_token: ${{ secrets.GITHUB_TOKEN }}
227235
file: roles/target/arm-unknown-linux-gnueabi/release/jd_server
228-
asset_name: jd_server-arm-linux-gnueabi
229-
tag: ${{ github.ref }}
236+
asset_name: jd-server-sv2-${{ env.RELEASE_VERSION }}-arm-linux-gnueabi
237+
tag: ${{ env.RELEASE_VERSION }}
230238

231239
- name: Upload MacOS x86-64 binaries to release
232240
if: matrix.os == 'macos-latest'
233241
uses: svenstaro/upload-release-action@v2
234242
with:
235243
repo_token: ${{ secrets.GITHUB_TOKEN }}
236244
file: roles/target/release/jd_server
237-
asset_name: jd_server-x86_64-apple-darwin
238-
tag: ${{ github.ref }}
245+
asset_name: jd-server-sv2-${{ env.RELEASE_VERSION }}-x86_64-apple-darwin
246+
tag: ${{ env.RELEASE_VERSION }}
239247

240248
- name: Upload MacOS ARM64 binaries to release
241249
if: matrix.os == 'macos-latest'
242250
uses: svenstaro/upload-release-action@v2
243251
with:
244252
repo_token: ${{ secrets.GITHUB_TOKEN }}
245253
file: roles/target/aarch64-apple-darwin/release/jd_server
246-
asset_name: jd_server-aarch64-apple-darwin
247-
tag: ${{ github.ref }}
254+
asset_name: jd-server-sv2-${{ env.RELEASE_VERSION }}-aarch64-apple-darwin
255+
tag: ${{ env.RELEASE_VERSION }}
248256

249257
release_proxy:
250258
runs-on: ${{ matrix.os }}
@@ -258,6 +266,9 @@ jobs:
258266
toolchain: stable
259267
override: true
260268

269+
- name: Set env
270+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
271+
261272
- name: Compile Native
262273
run: cargo build --release --locked --manifest-path=roles/mining-proxy/Cargo.toml
263274

@@ -286,44 +297,44 @@ jobs:
286297
with:
287298
repo_token: ${{ secrets.GITHUB_TOKEN }}
288299
file: roles/target/release/mining_proxy_sv2
289-
asset_name: mining_proxy_sv2-x86_64-linux-gnu
290-
tag: ${{ github.ref }}
300+
asset_name: mining-proxy-sv2-${{ env.RELEASE_VERSION }}-x86_64-linux-gnu
301+
tag: ${{ env.RELEASE_VERSION }}
291302

292303
- name: Upload Linux aarch64 binaries to release
293304
if: matrix.os == 'ubuntu-20.04'
294305
uses: svenstaro/upload-release-action@v2
295306
with:
296307
repo_token: ${{ secrets.GITHUB_TOKEN }}
297308
file: roles/target/aarch64-unknown-linux-gnu/release/mining_proxy_sv2
298-
asset_name: mining_proxy_sv2-aarch64-linux-gnu
299-
tag: ${{ github.ref }}
309+
asset_name: mining-proxy-sv2-${{ env.RELEASE_VERSION }}-aarch64-linux-gnu
310+
tag: ${{ env.RELEASE_VERSION }}
300311

301312
- name: Upload Linux ARM binaries to release
302313
if: matrix.os == 'ubuntu-20.04'
303314
uses: svenstaro/upload-release-action@v2
304315
with:
305316
repo_token: ${{ secrets.GITHUB_TOKEN }}
306317
file: roles/target/arm-unknown-linux-gnueabi/release/mining_proxy_sv2
307-
asset_name: mining_proxy_sv2-arm-linux-gnueabi
308-
tag: ${{ github.ref }}
318+
asset_name: mining-proxy-sv2-${{ env.RELEASE_VERSION }}-arm-linux-gnueabi
319+
tag: ${{ env.RELEASE_VERSION }}
309320

310321
- name: Upload MacOS x86-64 binaries to release
311322
if: matrix.os == 'macos-latest'
312323
uses: svenstaro/upload-release-action@v2
313324
with:
314325
repo_token: ${{ secrets.GITHUB_TOKEN }}
315326
file: roles/target/release/mining_proxy_sv2
316-
asset_name: mining_proxy_sv2-x86_64-apple-darwin
317-
tag: ${{ github.ref }}
327+
asset_name: mining-proxy-sv2-${{ env.RELEASE_VERSION }}-x86_64-apple-darwin
328+
tag: ${{ env.RELEASE_VERSION }}
318329

319330
- name: Upload MacOS ARM64 binaries to release
320331
if: matrix.os == 'macos-latest'
321332
uses: svenstaro/upload-release-action@v2
322333
with:
323334
repo_token: ${{ secrets.GITHUB_TOKEN }}
324335
file: roles/target/aarch64-apple-darwin/release/mining_proxy_sv2
325-
asset_name: mining_proxy_sv2-aarch64-apple-darwin
326-
tag: ${{ github.ref }}
336+
asset_name: mining-proxy-sv2-${{ env.RELEASE_VERSION }}-aarch64-apple-darwin
337+
tag: ${{ env.RELEASE_VERSION }}
327338

328339
release_translator:
329340
runs-on: ${{ matrix.os }}
@@ -337,6 +348,9 @@ jobs:
337348
toolchain: stable
338349
override: true
339350

351+
- name: Set env
352+
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
353+
340354
- name: Compile Native
341355
run: cargo build --release --locked --manifest-path=roles/translator/Cargo.toml
342356

@@ -365,41 +379,41 @@ jobs:
365379
with:
366380
repo_token: ${{ secrets.GITHUB_TOKEN }}
367381
file: roles/target/release/translator_sv2
368-
asset_name: translator_sv2-x86_64-linux-gnu
369-
tag: ${{ github.ref }}
382+
asset_name: translator-sv2-${{ env.RELEASE_VERSION }}-x86_64-linux-gnu
383+
tag: ${{ env.RELEASE_VERSION }}
370384

371385
- name: Upload Linux aarch64 binaries to release
372386
if: matrix.os == 'ubuntu-20.04'
373387
uses: svenstaro/upload-release-action@v2
374388
with:
375389
repo_token: ${{ secrets.GITHUB_TOKEN }}
376390
file: roles/target/aarch64-unknown-linux-gnu/release/translator_sv2
377-
asset_name: translator_sv2-aarch64-linux-gnu
378-
tag: ${{ github.ref }}
391+
asset_name: translator-sv2-${{ env.RELEASE_VERSION }}-aarch64-linux-gnu
392+
tag: ${{ env.RELEASE_VERSION }}
379393

380394
- name: Upload Linux ARM binaries to release
381395
if: matrix.os == 'ubuntu-20.04'
382396
uses: svenstaro/upload-release-action@v2
383397
with:
384398
repo_token: ${{ secrets.GITHUB_TOKEN }}
385399
file: roles/target/arm-unknown-linux-gnueabi/release/translator_sv2
386-
asset_name: translator_sv2-arm-linux-gnueabi
387-
tag: ${{ github.ref }}
400+
asset_name: translator-sv2-${{ env.RELEASE_VERSION }}-arm-linux-gnueabi
401+
tag: ${{ env.RELEASE_VERSION }}
388402

389403
- name: Upload MacOS x86-64 binaries to release
390404
if: matrix.os == 'macos-latest'
391405
uses: svenstaro/upload-release-action@v2
392406
with:
393407
repo_token: ${{ secrets.GITHUB_TOKEN }}
394408
file: roles/target/release/translator_sv2
395-
asset_name: translator_sv2-x86_64-apple-darwin
396-
tag: ${{ github.ref }}
409+
asset_name: translator-sv2-${{ env.RELEASE_VERSION }}-x86_64-apple-darwin
410+
tag: ${{ env.RELEASE_VERSION }}
397411

398412
- name: Upload MacOS ARM64 binaries to release
399413
if: matrix.os == 'macos-latest'
400414
uses: svenstaro/upload-release-action@v2
401415
with:
402416
repo_token: ${{ secrets.GITHUB_TOKEN }}
403417
file: roles/target/aarch64-apple-darwin/release/translator_sv2
404-
asset_name: translator_sv2-aarch64-apple-darwin
405-
tag: ${{ github.ref }}
418+
asset_name: translator-sv2-${{ env.RELEASE_VERSION }}-aarch64-apple-darwin
419+
tag: ${{ env.RELEASE_VERSION }}

RELEASE.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,13 @@ Bugs are patched into separate branches that only live in the contributor's fork
5252
- merge back into: `dev`
5353
- naming convention: `patch-x`, where `x` describes the bug/patch
5454

55+
## Release Branches
56+
57+
Every new release, a branch is created.
58+
59+
- branch off from: `main`
60+
- naming convention: `vMAJOR.MINOR.PATCH`
61+
5562
# Releasing Roles Binaries
5663

5764
The [release page of SRI repo](https://github.com/stratum-mining/stratum/releases) provides executable binaries for all SRI roles, targeting popular hardware architectures.
@@ -60,6 +67,8 @@ The GitHub binary releases of the roles are handled in the `release-bin.yaml` wo
6067

6168
This workflow is manually started by navigating to the "Actions" tab in the SRI repo, then navigating to the Release workflow section, and clicking "Run Workflow".
6269

70+
Every time the workflow is manually triggered, the correct release branch must be chosen.
71+
6372
Note: in order to be able to manually trigger the "Run Workflow" button, the user needs to have "Write" permissions on the repository, otherwise the button will not show up on the UI.
6473

6574
# Publishing Library Crates

0 commit comments

Comments
 (0)