Skip to content

Update release.yml

Update release.yml #4

Workflow file for this run

name: Release OXID
on:
push:
branches:
- 'release**'
- 'main'
release:
types: [ published ]
permissions:
contents: read
jobs:
build-cli:
name: Build cli
strategy:
fail-fast: true
matrix:
include:
- os: windows
arch: amd64
output: OXID-windows-amd64.exe
- os: darwin
arch: amd64
output: OXID-darwin-amd64
- os: darwin
arch: arm64
output: OXID-darwin-arm64
- os: linux
arch: amd64
output: OXID-linux-amd64
- os: linux
arch: arm64
output: OXID-linux-arm64
runs-on: ubuntu-latest
env:
CGO_ENABLED: 0
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- uses: actions/cache@v2
with:
path: /opt/hostedtoolcache/go
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
- uses: actions/setup-go@v3
with:
go-version: 1.18
cache: true
- run: go build -trimpath -ldflags "-w -s -extldflags '-static'" -o target/${{ matrix.output }}
- uses: actions/upload-artifact@v3
with:
name: target
path: target/*