Bump golang.org/x/net from 0.20.0 to 0.23.0 (#4) #7
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
# This workflow will build a golang project | |
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go | |
name: Build get-zap | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
build: | |
name: Build local | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.20' | |
- name: Build | |
run: go build -v ./... | |
- name: Test | |
run: go test -v ./... | |
build-all: | |
name: Build all binaries | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
goos: [linux, darwin, windows] | |
goarch: [amd64, arm64] | |
needs: [build] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Go | |
uses: actions/setup-go@v5 | |
with: | |
go-version: '1.20' | |
- name: Build get-zap for a given architecture | |
run: GOOS=${{matrix.goos}} GOARCH=${{matrix.goarch}} go build -o bin/get-zap-${{matrix.goos}}-${{matrix.goarch}}${{matrix.goos == 'windows' && '.exe' || ''}} | |
- name: Strip Linux and Windows binaries | |
if: matrix.goos != 'darwin' && matrix.goarch != 'arm64' | |
run: strip bin/get-zap-${{matrix.goos}}-${{matrix.goarch}}${{matrix.goos == 'windows' && '.exe' || ''}} | |
- name: Archive the binary | |
uses: actions/upload-artifact@v4 | |
with: | |
name: get-zap-${{matrix.goos}}-${{matrix.goarch}}${{matrix.goos == 'windows' && '.exe' || ''}} | |
path: bin/get-zap-${{matrix.goos}}-${{matrix.goarch}}${{matrix.goos == 'windows' && '.exe' || ''}} | |