Skip to content

Prefix option

Prefix option #181

Workflow file for this run

name: Build silta cli binary and attach to test release
on:
push:
branches: [ feature/* ]
# 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: test
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 }}"