Merge pull request #64 from wunderio/feature/chart-name #57
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: Build silta cli binary on push to master branch | |
on: | |
push: | |
branches: [ master ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
tests-matrix: | |
name: Tests | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
goos: [linux, darwin, windows] | |
goarch: [amd64, arm64] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: azure/setup-helm@v3 | |
with: | |
version: 'v3.6.3' | |
name: Install Helm | |
- name: Add wunderio Helm repo | |
run: helm repo add wunderio https://storage.googleapis.com/charts.wdr.io | |
- name: Set up Go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: 1.19.1 | |
- name: Run tests | |
run: go test -v ./tests | |
releases-matrix: | |
name: Cross compile and release Go Binaries | |
runs-on: ubuntu-latest | |
needs: tests-matrix | |
strategy: | |
matrix: | |
# Release unsigned darwin binaries | |
goos: [linux, darwin, windows] | |
goarch: [amd64, arm64] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set output | |
id: vars | |
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- uses: wangyoucao577/[email protected] | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
goos: ${{ matrix.goos }} | |
goarch: ${{ matrix.goarch }} | |
release_tag: master | |
overwrite: true | |
goversion: "https://go.dev/dl/go1.19.1.linux-amd64.tar.gz" | |
binary_name: "silta" | |
ldflags: "-X github.com/wunderio/silta-cli/internal/common.Version=${{ steps.vars.outputs.sha_short }} -s -w" |