Skip to content

Commit

Permalink
try number 2 for go release
Browse files Browse the repository at this point in the history
  • Loading branch information
kahlstrm committed Nov 8, 2023
1 parent 3e0ad56 commit 0ee0188
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 8 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/go.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
name: Go build

# Run either when pushing directly to main/master or in a PR targeting main/master
on:
push:
branches:
- master
- main
paths:
- "**.go"
- "go/go.mod"
- "go/go.sum"
- ".github/workflows/go.yml"
pull_request:
branches:
- master
- main

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v4
with:
go-version: "1.21.x"
- name: Install dependencies
run: go get .
- name: Build
run: go build -v ./...
- name: Test with the Go CLI
run: go test
22 changes: 14 additions & 8 deletions .github/workflows/release-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,20 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
goos: [linux, darwin]
goos: [linux, darwin, windows]
goarch: [amd64, arm64]
steps:
- uses: actions/checkout@v3
- uses: wangyoucao577/go-release-action@v1
- uses: actions/checkout@v4
- uses: actions/setup-go@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
goos: ${{ matrix.goos }}
goarch: ${{ matrix.goarch }}
project_path: "./go"
extra_files: LICENSE README.md
go-version: "1.21.x"
- name: "go build"
run: go/build.sh
env:
GOARCH: ${{matrix.goarch}}
GOOS: ${{matrix.goos}}
- uses: Shopify/[email protected]
with:
name: vault-${{matrix.goos}}-${{matrix.goarch}}-${{github.ref}}${{matrix.goos == 'windows' && '.exe' ||''}}
path: go/nitor_vault
repo-token: ${{ secrets.GITHUB_TOKEN }}

0 comments on commit 0ee0188

Please sign in to comment.