Skip to content

Commit a5a78d1

Browse files
fix(release): enable CGO
1 parent b0f4f56 commit a5a78d1

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

.github/workflows/release.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: Goreleaser
22

33
on:
4+
workflow_dispatch:
5+
inputs:
6+
goReleaserConfig:
7+
description: 'Configuration ENV for goreleaser'
8+
required: false
9+
default: 'CGO_ENABLED=1'
410
push:
511
tags:
612
- "*"

.goreleaser.yaml

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
11
version: 1
2-
32
project_name: TG-FileStreamBot
4-
3+
env:
4+
- GO111MODULE=on
55
before:
66
hooks:
77
- go mod tidy
88
- go generate ./...
99

1010
builds:
11-
- id: fsb-main
12-
main: ./cmd/fsb
11+
- main: ./cmd/fsb
1312
env:
14-
- CGO_ENABLED=0
13+
- CGO_ENABLED=1
14+
flags: -tags=musl
15+
ldflags: "-linkmode=external -extldflags -static -s -w"
1516
binary: fsb
1617
goos:
1718
- linux
@@ -20,10 +21,6 @@ builds:
2021
goarch:
2122
- amd64
2223
- arm64
23-
ignore:
24-
- goos: windows
25-
goarch: 386
26-
no_main_check: true
2724

2825
archives:
2926
- format: tar.gz

0 commit comments

Comments
 (0)