Skip to content

Commit 792b988

Browse files
committed
update release workflow
1 parent ce940ee commit 792b988

File tree

2 files changed

+64
-13
lines changed

2 files changed

+64
-13
lines changed

.github/workflows/release.yml

+5-13
Original file line numberDiff line numberDiff line change
@@ -41,19 +41,11 @@ jobs:
4141
run: |
4242
go test -v ./... -tags $BUILD_TAGS
4343
44-
-
45-
name: Import GPG key
46-
id: import_gpg
47-
uses: crazy-max/ghaction-import-gpg@v2
48-
env:
49-
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
50-
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
51-
-
52-
name: Run GoReleaser
53-
uses: goreleaser/goreleaser-action@v2
44+
- id: create_draft_release
45+
name: Create Draft Release
46+
uses: softprops/action-gh-release@v1
5447
with:
55-
version: latest
56-
args: release --clean --release-header .goreleaser.tmpl
48+
draft: true
49+
body: Draft release
5750
env:
5851
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59-
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

.github/workflows/release.yml.old

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*'
7+
8+
env:
9+
BUILD_TAGS: 'akscluster cluster clustergroup credential ekscluster gitrepository iampolicy kustomization namespace custompolicy imagepolicy networkpolicy quotapolicy securitypolicy sourcesecret workspace tanzupackage tanzupackages packagerepository packageinstall clustersecret integration mutationpolicy backupschedule targetlocation dataprotection tanzukubernetescluster clusterclass managementcluster provisioner inspections custompolicytemplate customiamrole permissiontemplate'
10+
11+
jobs:
12+
prepare_release:
13+
runs-on: ubuntu-latest
14+
steps:
15+
-
16+
name: Checkout
17+
uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
20+
-
21+
name: Set up Go
22+
uses: actions/setup-go@v2
23+
with:
24+
go-version: 1.19
25+
-
26+
name: golangci-lint
27+
uses: golangci/golangci-lint-action@v3
28+
with:
29+
version: v1.48.0
30+
args: --issues-exit-code=1
31+
skip-pkg-cache: true
32+
skip-build-cache: true
33+
34+
-
35+
name: unit-test
36+
run: |
37+
go test -v ./... -cover
38+
39+
-
40+
name: mock-test
41+
run: |
42+
go test -v ./... -tags $BUILD_TAGS
43+
44+
-
45+
name: Import GPG key
46+
id: import_gpg
47+
uses: crazy-max/ghaction-import-gpg@v2
48+
env:
49+
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
50+
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
51+
-
52+
name: Run GoReleaser
53+
uses: goreleaser/goreleaser-action@v2
54+
with:
55+
version: latest
56+
args: release --rm-dist --release-header .goreleaser.tmpl
57+
env:
58+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
59+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

0 commit comments

Comments
 (0)