1- # release-workflow.yaml
2- # Copyright (c) 2024 Dell Inc., or its subsidiaries. All Rights Reserved.
3- # Licensed under the Apache License, Version 2.0
4-
51name : Create Tag and Release
62
73on :
@@ -25,12 +21,15 @@ jobs:
2521 uses : actions/checkout@v4
2622 with :
2723 fetch-depth : 0
24+
2825 - name : Set up Go
2926 uses : actions/setup-go@v5
3027 with :
3128 go-version : " 1.24"
29+
3230 - name : Install dependencies
3331 run : go mod tidy
32+
3433 - name : Build binaries
3534 run : |
3635 echo "Building binaries to attach to the release if any..."
4645 mv repctl-linux-amd64 ../
4746 echo "BIN_NAME=repctl-linux-amd64" >> $GITHUB_ENV
4847 fi
48+
4949 - name : Upload Binaries
5050 if : ${{ env.BIN_NAME != '' }}
51515555 name : ${{ env.BIN_NAME }}
5656 path : ${{ env.BIN_NAME }}
5757
58+ decrypt-secret :
59+ name : Decrypt Secret File
60+ runs-on : ubuntu-latest
61+ steps :
62+ - name : Checkout code
63+ uses : actions/checkout@v4
64+
65+ - name : Import GPG private key
66+ run : |
67+ echo "$GPG_PRIVATE_KEY" | gpg --batch --import
68+ env :
69+ GPG_PRIVATE_KEY : ${{ secrets.GPG_PRIVATE_KEY }}
70+
71+ - name : Decrypt secret file
72+ run : |
73+ gpg --quiet --batch --yes --decrypt --passphrase="$GPG_PASSPHRASE" \
74+ --output secret.txt secret.txt.gpg
75+ env :
76+ GPG_PASSPHRASE : ${{ secrets.GPG_PASSPHRASE }}
77+
5878 release-and-tag :
5979 name : Tag and Release
60- needs : build-and-scan
80+ needs : [ build-and-scan, decrypt-secret]
6181 uses : KshitijaKakde/common-github-actions/.github/workflows/release-creator.yaml@main
6282 with :
6383 version : ${{ inputs.version }}
0 commit comments