Skip to content

Commit def7807

Browse files
authored
Feature/tag release update (#71)
* ci: try release update * ci: fix conditions * ci: try upload with variables * Update main.yml * ci: split upload * ci: fix asset name * ci: fix signature asset name
1 parent 1bb7b2b commit def7807

File tree

1 file changed

+46
-5
lines changed

1 file changed

+46
-5
lines changed

.github/workflows/main.yml

Lines changed: 46 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ on:
77
# Triggers the workflow on push or pull request events but only for the "main" branch
88
push:
99
branches: [ "dev" ]
10+
tags:
11+
- v*
1012
pull_request:
1113
branches: [ "dev" ]
1214

@@ -24,7 +26,7 @@ env:
2426
SMALLSTEP_DOWNLOAD: "https://github.com/smallstep/cli/releases/download"
2527
SMALLSTEP_VERSION: "0.25.2"
2628
SMALLSTEP_EXTERNAL: "rcm/client/external/step"
27-
29+
2830
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
2931
jobs:
3032
# This workflow contains a single job called "build"
@@ -44,7 +46,7 @@ jobs:
4446

4547
# The type of runner that the job will run on
4648
runs-on: ${{ matrix.os }}
47-
49+
4850
# Steps represent a sequence of tasks that will be executed as part of the job
4951
steps:
5052
- name: Install Qt missing libraries (linux only)
@@ -288,17 +290,38 @@ jobs:
288290
COSIGN_PUBLIC_KEY: ${{ secrets.COSIGN_PUBLIC_KEY }}
289291
COSIGN_PASSWORD: ${{ secrets.COSIGN_PASSWORD }}
290292

293+
- name: (GHO)(TAG) Upload exe to release
294+
if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
295+
uses: svenstaro/upload-release-action@v2
296+
with:
297+
file: RCM${{ env.EXT }}
298+
asset_name: RCM-client_${{ matrix.os }}_turbovnc_${{ matrix.turbovnc-version }}${{ env.EXT }}
299+
prerelease: true
300+
overwrite: true
301+
tag: ${{ github.ref }}
302+
303+
- name: (GHO)(TAG) Upload sign to release
304+
if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
305+
uses: svenstaro/upload-release-action@v2
306+
with:
307+
file: RCM.sig
308+
asset_name: RCM-client_${{ matrix.os }}_turbovnc_${{ matrix.turbovnc-version }}.sig
309+
prerelease: true
310+
overwrite: true
311+
tag: ${{ github.ref }}
312+
291313
- name: (GHO) Upload exe
314+
if: ${{ github.event_name != 'push' && !contains(github.ref, 'refs/tags/') }}
292315
uses: actions/upload-artifact@v4.3.1
293316
with:
294317
name: RCM-client-${{ matrix.os }}-turbovnc-${{ matrix.turbovnc-version }}
295318
path: |
296-
RCM
297-
RCM.exe
319+
RCM${{ env.EXT }}
298320
RCM.sig
299321
RCM.pub
300322
301323
- name: (GHO) Upload dir
324+
if: ${{ github.event_name != 'push' && !contains(github.ref, 'refs/tags/') }}
302325
uses: actions/upload-artifact@v4.3.1
303326
with:
304327
name: RCM-client-${{ matrix.os }}-turbovnc-${{ matrix.turbovnc-version }}-dir
@@ -313,9 +336,27 @@ jobs:
313336
rm -rf RCM RCM.exe RCM-dir
314337
mv RCM-repo RCM
315338
339+
upload-public-key:
340+
runs-on: ubuntu-latest
341+
if: ${{ github.event_name == 'push' && contains(github.ref, 'refs/tags/') }}
342+
steps:
343+
- name: (GHO) Sign image with a key
344+
run: echo "${{ env.COSIGN_PUBLIC_KEY }}" > RCM.pub
345+
env:
346+
COSIGN_PUBLIC_KEY: ${{ secrets.COSIGN_PUBLIC_KEY }}
347+
348+
- name: (GHO)(TAG) Upload exe to release
349+
uses: svenstaro/upload-release-action@v2
350+
with:
351+
file: RCM.pub
352+
asset_name: RCM.pub
353+
prerelease: true
354+
overwrite: true
355+
tag: ${{ github.ref }}
356+
316357
nightly-link:
317358
runs-on: ubuntu-latest
318-
if: ${{ always() }}
359+
if: ${{ always() }} && ${{ github.event_name != 'push' && !contains(github.ref, 'refs/tags/') }}
319360
steps:
320361
- name: Generate Annotation
321362
run: |

0 commit comments

Comments
 (0)