Skip to content

feat: update workspace type add secret store config (#724) #90

feat: update workspace type add secret store config (#724)

feat: update workspace type add secret store config (#724) #90

Workflow file for this run

# Reference from:
# https://goreleaser.com/ci/actions/
name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
jobs:
Test:
name: Unit tests with coverage
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go 1.19
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: Running go tests with coverage
env:
GO111MODULE: on
run: make cover
- name: Send coverage
uses: shogo82148/actions-goveralls@v1
with:
path-to-profile: coverage.out
Lint:
name: Lint checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Set up Go 1.19
uses: actions/setup-go@v2
with:
go-version: 1.19
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.52.2
Publish: # Pack and publish image to Docker Hub and Github Release
runs-on: ubuntu-latest
needs: [Test, Lint]
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
# <--- Get version informations --->
- name: Get version
id: get_version
run: |
go generate ./pkg/version > version.txt
echo "kusion_version=$(cat version.txt | grep releaseVersion | cut -d ':' -f 2 | awk '$1=$1')" >> $GITHUB_OUTPUT
echo "kclgo_version=$(cat version.txt | grep kclGoVersion | cut -d ':' -f 2 | awk '$1=$1')" >> $GITHUB_OUTPUT
echo "kclplugin_version=$(cat version.txt | grep kclPluginVersion | cut -d ':' -f 2 | awk '$1=$1')" >> $GITHUB_OUTPUT
rm version.txt
# <--- Login, build and push image to Docker Hub --->
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
# <--- End --->
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
distribution: goreleaser
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.KUSIONSTACK_BOT_TOKEN }}
KUSION_VERSION: ${{ steps.get_version.outputs.kusion_version }}
KCL_GO_VERSION: ${{ steps.get_version.outputs.kclgo_version }}
KCL_PLUGIN_VERSION: ${{ steps.get_version.outputs.kclplugin_version }}