-
Notifications
You must be signed in to change notification settings - Fork 29
40 lines (33 loc) · 1.25 KB
/
release.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Github Release
on:
push:
tags:
- "*"
jobs:
release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
# https://github.com/actions/setup-go
- uses: actions/setup-go@v4
with:
go-version: "1.22"
- run: go test ./...
- run: go build -ldflags "-s -w" -o gowebdav_linux_amd64 .
- run: CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags "-s -w" -o gowebdav_windows_amd64.exe .
- run: CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -ldflags "-s -w" -o gowebdav_darwin_amd64 .
- run: CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -ldflags "-s -w" -o gowebdav_linux_arm64 .
- run: CGO_ENABLED=0 GOOS=windows GOARCH=arm64 go build -ldflags "-s -w" -o gowebdav_windows_arm64.exe .
- run: CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -ldflags "-s -w" -o gowebdav_darwin_arm64 .
- name: Release
uses: softprops/action-gh-release@v1
with:
files: |
gowebdav_linux_amd64
gowebdav_windows_amd64.exe
gowebdav_darwin_amd64
gowebdav_linux_arm64
gowebdav_windows_arm64.exe
gowebdav_darwin_arm64
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}