Merge pull request #436 from vegaprotocol/update-signer-scheme #26
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 binaries | |
"on": | |
push: | |
tags: | |
- "v*" | |
jobs: | |
release: | |
name: "Release for ${{ matrix.os }}-${{ matrix.arch }}" | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
strategy: | |
matrix: | |
arch: [ amd64, arm64 ] | |
os: [ linux, darwin ] | |
env: | |
GOOS: ${{ matrix.os }} | |
GOARCH: ${{ matrix.arch }} | |
CGO_ENABLED: 0 | |
steps: | |
- name: Set up Go | |
uses: actions/setup-go@v4 | |
with: | |
go-version: '1.21.5' | |
- name: Check out code | |
uses: actions/checkout@v3 | |
with: | |
ref: ${{ inputs.tag }} | |
- name: Run tests | |
if: ${{ env.GOARCH == 'amd64' && env.GOOS == 'linux' }} | |
run: go test -v ./... | |
- name: Build binary | |
run: | | |
hash=$(echo ${{ github.sha }} | cut -b1-8) | |
go build -o build/vegacapsule -ldflags "-X code.vegaprotocol.io/vegacapsule/version.VersionHash=$hash" | |
- name: Bundle binary in archive | |
uses: thedoctor0/zip-release@master | |
with: | |
type: zip | |
directory: build | |
filename: vegacapsule-${{ matrix.os }}-${{ matrix.arch }}.zip | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: build/*.zip | |
name: ${{ github.ref_name }} | |
tag_name: ${{ github.ref_name }} | |
prerelease: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |