46 lines
1.2 KiB
YAML
46 lines
1.2 KiB
YAML
|
name: Build Artifacts
|
||
|
on:
|
||
|
workflow_dispatch:
|
||
|
push:
|
||
|
branches:
|
||
|
- master
|
||
|
paths-ignore:
|
||
|
- "**.md"
|
||
|
|
||
|
jobs:
|
||
|
build_artifacts:
|
||
|
name: Build Artifcats
|
||
|
runs-on: ubuntu-latest
|
||
|
strategy:
|
||
|
matrix:
|
||
|
goos:
|
||
|
- linux
|
||
|
- windows
|
||
|
- darwin
|
||
|
goarch:
|
||
|
- amd64
|
||
|
- arm64
|
||
|
steps:
|
||
|
- name: Set up Go
|
||
|
uses: actions/setup-go@v1
|
||
|
with:
|
||
|
go-version: "^1.17"
|
||
|
- name: Check out code into the Go module directory
|
||
|
uses: actions/checkout@v2
|
||
|
- name: Get dependencies
|
||
|
run: go get ./...
|
||
|
- name: Build Client (${{ matrix.goos }}-${{ matrix.goarch }})
|
||
|
env:
|
||
|
GOOS: ${{ matrix.goos }}
|
||
|
GOARCH: ${{ matrix.goarch }}
|
||
|
run: go build -v -o ./bin/gowebdav-${{ matrix.goos }}-${{ matrix.goarch }} ./cmd/gowebdav/main.go
|
||
|
- name: Rename Windows Binary
|
||
|
if: ${{ matrix.goos == 'windows' }}
|
||
|
env:
|
||
|
FNAME: ./bin/gowebdav-${{ matrix.goos }}-${{ matrix.goarch }}
|
||
|
run: mv ${{ env.FNAME }} ${{ env.FNAME }}.exe
|
||
|
- name: Upload Artifcats
|
||
|
uses: actions/upload-artifact@v2
|
||
|
with:
|
||
|
name: ${{ matrix.goos }}-${{ matrix.goarch }}
|
||
|
path: ./bin/
|