Skip to content

Commit

Permalink
updated goreleaser configuration (#790)
Browse files Browse the repository at this point in the history
  • Loading branch information
sio4 authored Oct 7, 2022
1 parent 482c695 commit 4a837b5
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 30 deletions.
23 changes: 9 additions & 14 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,22 +8,17 @@ jobs:
release:
name: Release
runs-on: ubuntu-latest
permissions:
contents: write
packages: write
issues: write
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Set up Go 1.17
uses: actions/setup-go@v3
- uses: actions/checkout@v3
with:
go-version: 1.17

- name: Fetch tags
run: git fetch --depth=1 origin +refs/tags/*:refs/tags/*

- name: setup release environment
fetch-depth: 0
- name: setup environment
run: |-
echo 'GITHUB_TOKEN=${{secrets.GORELEASER_TOKEN }}' > .release-env
- name: release publish
echo 'GITHUB_TOKEN=${{secrets.GORELEASER_PAT }}' > .release-env
- name: run goreleaser
run: make release

8 changes: 3 additions & 5 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,7 @@ builds:
- amd64

archives:
-
format_overrides:
- format_overrides:
- goos: windows
format: zip

Expand All @@ -104,11 +103,10 @@ changelog:
- '^test:'

brews:
-
name: 'pop'
- name: 'pop'
tap:
owner: gobuffalo
name: homebrew-tap
homepage: "https://gobuffalo.io/docs/db/getting-started"
homepage: "https://gobuffalo.io/documentation/database/pop/"
description: "A Tasty Treat For All Your Database Needs"
skip_upload: "auto"
12 changes: 1 addition & 11 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PACKAGE_NAME := github.com/gobuffalo/pop
GOLANG_CROSS_VERSION ?= v1.17.6
GOLANG_CROSS_VERSION ?= v1.18

TAGS ?= "sqlite"
GO_BIN ?= go
Expand All @@ -19,14 +19,6 @@ lint:
release-test:
./test.sh

.PHONY: sysroot-pack
sysroot-pack:
@tar cf - $(SYSROOT_DIR) -P | pv -s $[$(du -sk $(SYSROOT_DIR) | awk '{print $1}') * 1024] | pbzip2 > $(SYSROOT_ARCHIVE)

.PHONY: sysroot-unpack
sysroot-unpack:
@pv $(SYSROOT_ARCHIVE) | pbzip2 -cd | tar -xf -

.PHONY: release-dry-run
release-dry-run:
@docker run \
Expand All @@ -36,7 +28,6 @@ release-dry-run:
--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) \
goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
--rm-dist --skip-validate --skip-publish --snapshot
Expand All @@ -54,7 +45,6 @@ release:
--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) \
goreleaser/goreleaser-cross:${GOLANG_CROSS_VERSION} \
release --rm-dist

0 comments on commit 4a837b5

Please sign in to comment.