Skip to content

Commit

Permalink
check goreleaser
Browse files Browse the repository at this point in the history
  • Loading branch information
sio4 committed Oct 7, 2022
1 parent 482c695 commit 723edba
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 25 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

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 723edba

Please sign in to comment.