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

Commit

Permalink
goreleaser pro
Browse files Browse the repository at this point in the history
  • Loading branch information
itsdevbear committed May 16, 2023
1 parent 3967fa2 commit c320840
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 23 deletions.
31 changes: 9 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,19 @@
name: release

on:
pull_request:
push:

permissions:
contents: write

push:

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Set up Go
submodules: true
- name: Set up Go
uses: actions/setup-go@v4
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
# either 'goreleaser' (default) or 'goreleaser-pro'
distribution: goreleaser-pro
version: latest
args: release --snapshot --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_KEY: ${{ secrets.GORELEASER_KEY }}
go-version: 1.19
check-latest: true
- name: release dry run
run: make release-dry-run
21 changes: 20 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,23 @@ help:

# Rule to setup the project. This is a special case because it's not a Mage target.
setup:
@go run magefiles/setup/setup.go
@go run magefiles/setup/setup.go



PACKAGE_NAME:=pkg.berachain.dev/polaris/cosmos
GOLANG_CROSS_VERSION = v1.20.4
GOPATH ?= '$(HOME)/go'
release-dry-run:
docker run \
--rm \
--privileged \
-e CGO_ENABLED=1 \
-v /var/run/docker.sock:/var/run/docker.sock \
-v `pwd`:/go/src/$(PACKAGE_NAME) \
-v ${GOPATH}/pkg:/go/pkg \
-w /go/src/$(PACKAGE_NAME) \
ghcr.io/goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
--rm-dist --skip-validate --skip-publish --snapshot

.PHONY: release-dry-run release

0 comments on commit c320840

Please sign in to comment.