Skip to content

Commit 1c7459e

Browse files
author
elifish4
authored
update release stage
1 parent fbe30b4 commit 1c7459e

File tree

1 file changed

+19
-1
lines changed

1 file changed

+19
-1
lines changed

codefresh.yml

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ version: '1.0'
22
stages:
33
- clone
44
- test
5+
- pakcages
56
- release
67
steps:
78
main_clone:
@@ -10,7 +11,7 @@ steps:
1011
type: git-clone
1112
repo: "${{CF_REPO_OWNER}}/${{CF_REPO_NAME}}"
1213
revision: "${{CF_REVISION}}"
13-
git: cf_github
14+
git: github
1415

1516
go_fmt:
1617
title: 'Formatting'
@@ -23,9 +24,15 @@ steps:
2324
title: 'Preparing environment variables...'
2425
stage: release
2526
image: codefreshio/ci-helpers
27+
environment:
28+
- GPG_FINGERPRINT=${{GPG_FINGERPRINT}}
29+
- SIGNINGKEY=${{SIGNINGKEY}}
2630
commands:
2731
- source /get-token/get-gh-token.sh
2832
- cf_export GITHUB_TOKEN
33+
- cf_export GPG_FINGERPRINT
34+
- cf_export SIGNINGKEY
35+
- cf_export PRIVATE_KEY_PATH
2936
when:
3037
condition:
3138
all:
@@ -35,7 +42,18 @@ steps:
3542
title: Create release in Github
3643
image: goreleaser/goreleaser:v0.133
3744
stage: release
45+
environment:
46+
- GPG_FINGERPRINT=${{GPG_FINGERPRINT}}
47+
- SIGNINGKEY=${{SIGNINGKEY}}
48+
- PRIVATE_KEY_PATH=${{PRIVATE_KEY_PATH}}
3849
commands:
50+
- apk update
51+
- apk fetch gnupg
52+
- apk add gnupg
53+
- wget ${PRIVATE_KEY_PATH} -O /tmp/private.key
54+
- gpg --import /tmp/private.key
55+
- git config user.signingkey ${GPG_FINGERPRINT}
56+
- git clean -fdx
3957
- goreleaser release --rm-dist
4058
when:
4159
condition:

0 commit comments

Comments
 (0)