Skip to content
This repository was archived by the owner on Feb 13, 2024. It is now read-only.

Commit a730cab

Browse files
authored
fix: failed cross-platform build (#386)
* fix: failed cross-platform build * update goreleaser-action to v5 * replace "release --rm-dist" with "release --clean" in release-publish.yaml * update Makefile to use "--clean" and "--skip=validate" options in goreleaser build command Signed-off-by: Dwi Siswanto <[email protected]> * ci(pr): update goreleaser version to v5 also modify args for cross-platform checks Signed-off-by: Dwi Siswanto <[email protected]> --------- Signed-off-by: Dwi Siswanto <[email protected]>
1 parent 1319fc0 commit a730cab

File tree

4 files changed

+25
-15
lines changed

4 files changed

+25
-15
lines changed

.github/workflows/pr.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ jobs:
3838
semgrep scan --config auto --dryrun -q --include "**.go"
3939
4040
- name: Cross-platform checks
41-
uses: goreleaser/goreleaser-action@v3
41+
uses: goreleaser/goreleaser-action@v5
4242
with:
4343
version: latest
44-
args: build --skip-validate --rm-dist --snapshot --timeout=30m
44+
args: build --clean --skip=validate --snapshot --timeout=30m
4545

4646
- name: Initialize CodeQL
4747
uses: github/codeql-action/init@v2

.github/workflows/release-publish.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ jobs:
1919
go-version: 1.18
2020

2121
- name: "Create release on GitHub"
22-
uses: goreleaser/goreleaser-action@v3
22+
uses: goreleaser/goreleaser-action@v5
2323
env:
2424
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
2525
with:
26-
args: "release --rm-dist"
26+
args: "release --clean"
2727
version: latest
2828

2929
publish:

.goreleaser.yml

Lines changed: 20 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,23 @@ builds:
1111
- arm
1212
- arm64
1313
ldflags:
14-
- -s -w -X teler.app/common.Version=v{{.Version}}
15-
16-
archives:
17-
- id: tgz
18-
format: tar.gz
19-
replacements:
20-
darwin: macOS
21-
format_overrides:
22-
- goos: windows
23-
format: zip
14+
- -s -w -X github.com/kitabisa/teler/common.Version=v{{.Version}}
15+
16+
checksum:
17+
name_template: "{{ .ProjectName }}_checksums.txt"
18+
19+
snapshot:
20+
name_template: "{{ .Tag }}-{{.ShortCommit}}"
21+
22+
changelog:
23+
sort: asc
24+
filters:
25+
exclude:
26+
- "^docs"
27+
- "^chore"
28+
- "^style"
29+
- "^refactor"
30+
- "^test"
31+
- Merge pull request
32+
- Merge branch
33+
- go mod tidy

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ build-all:
3333
echo " See https://goreleaser.com/install/" >&2; \
3434
exit 1; \
3535
fi; \
36-
goreleaser build --rm-dist --skip-validate --snapshot --timeout=30m
36+
goreleaser build --clean --skip=validate --snapshot --timeout=30m
3737

3838
test: lint build-all clean
3939
# @echo "--- Testing ${APP_NAME} ${VERSION}"

0 commit comments

Comments
 (0)