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

Commit

Permalink
fix: failed cross-platform build (#386)
Browse files Browse the repository at this point in the history
* 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]>
  • Loading branch information
dwisiswant0 authored Feb 13, 2024
1 parent 1319fc0 commit a730cab
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 15 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ jobs:
semgrep scan --config auto --dryrun -q --include "**.go"
- name: Cross-platform checks
uses: goreleaser/goreleaser-action@v3
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: build --skip-validate --rm-dist --snapshot --timeout=30m
args: build --clean --skip=validate --snapshot --timeout=30m

- name: Initialize CodeQL
uses: github/codeql-action/init@v2
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@ jobs:
go-version: 1.18

- name: "Create release on GitHub"
uses: goreleaser/goreleaser-action@v3
uses: goreleaser/goreleaser-action@v5
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
args: "release --rm-dist"
args: "release --clean"
version: latest

publish:
Expand Down
30 changes: 20 additions & 10 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,23 @@ builds:
- arm
- arm64
ldflags:
- -s -w -X teler.app/common.Version=v{{.Version}}

archives:
- id: tgz
format: tar.gz
replacements:
darwin: macOS
format_overrides:
- goos: windows
format: zip
- -s -w -X github.com/kitabisa/teler/common.Version=v{{.Version}}

checksum:
name_template: "{{ .ProjectName }}_checksums.txt"

snapshot:
name_template: "{{ .Tag }}-{{.ShortCommit}}"

changelog:
sort: asc
filters:
exclude:
- "^docs"
- "^chore"
- "^style"
- "^refactor"
- "^test"
- Merge pull request
- Merge branch
- go mod tidy
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ build-all:
echo " See https://goreleaser.com/install/" >&2; \
exit 1; \
fi; \
goreleaser build --rm-dist --skip-validate --snapshot --timeout=30m
goreleaser build --clean --skip=validate --snapshot --timeout=30m

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

0 comments on commit a730cab

Please sign in to comment.