Skip to content

Commit

Permalink
update release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ankitsny committed Oct 23, 2024
1 parent 74e8faa commit 07281f4
Show file tree
Hide file tree
Showing 2 changed files with 64 additions and 13 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,19 +41,11 @@ jobs:
run: |
go test -v ./... -tags $BUILD_TAGS
-
name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v2
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
- id: create_draft_release
name: Create Draft Release
uses: softprops/action-gh-release@v1
with:
version: latest
args: release --rm-dist --release-header .goreleaser.tmpl
draft: true
body: Draft release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
59 changes: 59 additions & 0 deletions .github/workflows/release.yml.old
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: Release

on:
push:
tags:
- 'v*'

env:
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'

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.19
-
name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.48.0
args: --issues-exit-code=1
skip-pkg-cache: true
skip-build-cache: true

-
name: unit-test
run: |
go test -v ./... -cover

-
name: mock-test
run: |
go test -v ./... -tags $BUILD_TAGS

-
name: Import GPG key
id: import_gpg
uses: crazy-max/ghaction-import-gpg@v2
env:
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist --release-header .goreleaser.tmpl
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}

0 comments on commit 07281f4

Please sign in to comment.