Skip to content

Commit

Permalink
fix: fixing release
Browse files Browse the repository at this point in the history
  • Loading branch information
krzko committed Nov 13, 2023
1 parent e9fab31 commit 85fbdce
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 47 deletions.
25 changes: 8 additions & 17 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,20 +22,11 @@ jobs:
with:
go-version: ${{ env.GO_VERSION }}

# - name: Run GoReleaser
# uses: goreleaser/goreleaser-action@v5
# with:
# version: latest
# args: release --clean
# env:
# GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}

- name: Release dry run
run: make release-dry-run

- name: Seup release environment
run: |-
echo 'GITHUB_TOKEN=${{secrets.GORELEASER_TOKEN}}' > .release-env
- name: Release publish
run: make release
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GORELEASER_TOKEN }}

37 changes: 7 additions & 30 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
env:
- GO111MODULE=on
- CGO_ENABLED=1

- CGO_ENABLED=0

before:
hooks:
- go mod tidy
Expand All @@ -14,73 +13,51 @@ builds:
- amd64
goos:
- darwin
env:
- CC=o64-clang
- CXX=o64-clang++
flags:
- -mod=readonly
- -trimpath
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.CommitDate}}
mod_timestamp: "{{.CommitTimestamp}}"
- id: slack-buddy-darwin-arm64
binary: slack-buddy
main: ./cmd/slack-buddy
goarch:
- arm64
goos:
- darwin
env:
- CC=oa64-clang
- CXX=oa64-clang++
flags:
- -mod=readonly
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.CommitDate}}
mod_timestamp: "{{.CommitTimestamp}}"
- id: slack-buddy-linux-amd64
binary: slack-buddy
main: ./cmd/slack-buddy
env:
- CC=x86_64-linux-gnu-gcc
- CXX=x86_64-linux-gnu-g++
goarch:
- amd64
goos:
- linux
flags:
- -mod=readonly
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.CommitDate}}
- -extldflags "-lc -lrt -lpthread --static"
mod_timestamp: "{{.CommitTimestamp}}"
- id: slack-buddy-linux-arm64
binary: slack-buddy
main: ./cmd/slack-buddy
goarch:
- arm64
goos:
- linux
env:
- CC=aarch64-linux-gnu-gcc
- CXX=aarch64-linux-gnu-g++
flags:
- -mod=readonly
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.CommitDate}}
- -extldflags "-lc -lrt -lpthread --static"
mod_timestamp: "{{.CommitTimestamp}}"
- id: slack-buddy-windows-amd64
binary: slack-buddy
main: ./cmd/slack-buddy
goarch:
- amd64
goos:
- windows
env:
- CC=x86_64-w64-mingw32-gcc
- CXX=x86_64-w64-mingw32-g++
flags:
- -mod=readonly
- -buildmode=exe
ldflags:
- -s -w -X main.version={{.Version}} -X main.commit={{.ShortCommit}} -X main.date={{.CommitDate}}
mod_timestamp: "{{.CommitTimestamp}}"

universal_binaries:
- id: slack-buddy-darwin-universal
Expand Down

0 comments on commit 85fbdce

Please sign in to comment.