Skip to content

Commit 85789a1

Browse files
Update create-tag-release.yaml
1 parent a3501bc commit 85789a1

File tree

1 file changed

+25
-5
lines changed

1 file changed

+25
-5
lines changed

.github/workflows/create-tag-release.yaml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
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-
51
name: Create Tag and Release
62

73
on:
@@ -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..."
@@ -46,6 +45,7 @@ jobs:
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 != '' }}
5151
uses: actions/[email protected]
@@ -55,9 +55,29 @@ jobs:
5555
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

Comments
 (0)