update release workflow #43
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 | |
- id: create_draft_release | |
name: Create Draft Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
draft: true | |
body: Draft release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |