Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
jdkato committed Jun 8, 2024
1 parent b2140b7 commit 831e1ec
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 13 deletions.
16 changes: 6 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,14 @@ jobs:
run: |
choco help
- name: "[Build] GoReleaser"
run: make gr-dry
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
- name: Setup release environment
run: |-
echo 'GITHUB_TOKEN=${{secrets.GITHUB_TOKEN}}' > .release-env
echo 'CHOCOLATEY_API_KEY=${{secrets.CHOCOLATEY_API_KEY}}' >> .release-env
- name: "[Run] GoReleaser"
uses: goreleaser/goreleaser-action@v4
- name: "GoReleaser"
run: make gr
if: startsWith(github.ref, 'refs/tags/')
with:
version: v1.18.2
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CHOCOLATEY_API_KEY: ${{ secrets.CHOCOLATEY_API_KEY }}
Expand Down
7 changes: 4 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CURR_SHA=$(shell git rev-parse --verify HEAD)

LDFLAGS=-ldflags "-s -w -X main.version=$(LAST_TAG)"

.PHONY: data test lint install rules setup bench compare release gr-dry
.PHONY: data test lint install rules setup bench compare release gr

all: build

Expand Down Expand Up @@ -63,13 +63,14 @@ docker:
--push \
.

gr-dry:
gr:
@docker run \
--rm \
-e CGO_ENABLED=1 \
--env-file .release-env \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/go/src/$(PACKAGE_NAME) \
-v `pwd`/sysroot:/sysroot \
-w /go/src/$(PACKAGE_NAME) \
ghcr.io/goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
build --clean --debug
release --clean

0 comments on commit 831e1ec

Please sign in to comment.