Skip to content

Commit a3df5e2

Browse files
committed
ci: updates github workflows
1 parent d1e77e4 commit a3df5e2

File tree

2 files changed

+12
-5
lines changed

2 files changed

+12
-5
lines changed

.github/workflows/release.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ on:
55
tags:
66
- 'v*'
77

8+
branches:
9+
- master
10+
811
jobs:
912
build-binary:
1013
strategy:
@@ -16,17 +19,21 @@ jobs:
1619
- os: ubuntu-latest
1720
goos: linux
1821
platform: linux
22+
1923
- os: macos-13
2024
goos: darwin
2125
platform: darwin
26+
2227
- os: macos-14
2328
goos: darwin
2429
platform: darwin
2530
exclude:
2631
- os: macos-14
2732
arch: amd64
33+
2834
- os: macos-13
2935
arch: arm64
36+
3037
name: Building fwatcher-${{ matrix.platform }}-${{ matrix.arch }}
3138
runs-on: ${{ matrix.os }}
3239
steps:

Taskfile.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,23 +8,23 @@ tasks:
88
cmds:
99
- go run .
1010

11-
dev:build:
12-
cmds:
13-
- go build -ldflags "-s -w -X main.Version={{.version}}" -o ./bin/{{.name}}
14-
1511
build:
1612
requires:
1713
vars:
1814
- version
1915
vars:
2016
upx: '{{.upx | default "false"}}'
2117
binary: '{{.binary | default .name }}'
18+
date_str:
19+
sh: "date '+%T %p (%Z) | %a %b %d, %Y'"
20+
version_str: "[{{.version }}] built at {{.date_str}}"
2221
env:
2322
GOOS: '{{ .GOOS }}'
2423
GOARCH: '{{ .GOARCH }}'
2524
cmds:
2625
- echo "building binary for ${GOOS:-$(go env GOOS)} (${GOARCH:-$(go env GOARCH)})"
27-
- go build -ldflags "-s -w -X main.Version={{.version}}" -o ./bin/{{.binary}}
26+
- echo version str "{{.version_str}}"
27+
- go build -ldflags '-s -w -X "main.Version={{.version_str}}"' -o ./bin/{{.binary}}
2828
- |+
2929
if [[ "{{.upx}}" = "true" ]]; then
3030
upx ./bin/{{.binary}}

0 commit comments

Comments
 (0)