Skip to content

Commit

Permalink
Fix deps in release
Browse files Browse the repository at this point in the history
  • Loading branch information
knadh committed Apr 5, 2020
1 parent ef2073a commit 9131fac
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,22 @@ jobs:
-
name: Checkout
uses: actions/checkout@v1

-
name: Set up Go
uses: actions/setup-go@v1
with:
go-version: 1.14.x

-
name: Set Go tools bin path
run: |
echo "::add-path::$(go env GOPATH)/bin"
-
name: Login to DockerHub Registry
run: echo ${{ secrets.DOCKER_PASSWORD }} | docker login -u ${{ secrets.DOCKER_USERNAME }} --password-stdin

-
name: Run goreleaser
uses: goreleaser/goreleaser-action@v1
Expand Down
7 changes: 3 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ STATIC := static/templates static/static:/static config.toml.sample

.PHONY: deps
deps:
# If dependencies are not installed, install.
go get -u github.com/knadh/stuffbin/...

.PHONY: build
Expand All @@ -19,16 +20,14 @@ run: build
./${BIN}

.PHONY: dist
dist: build
# If dependencies are not installed, install.
@type stuffbin >/dev/null 2>&1 || make deps
dist: build deps
stuffbin -a stuff -in ${BIN} -out ${BIN} ${STATIC}

# pack-releases runns stuffbin packing on a given list of
# binaries. This is used with goreleaser for packing
# release builds for cross-build targets.
.PHONY: pack-releases
pack-releases:
pack-releases: deps
$(foreach var,$(RELEASE_BUILDS),stuffbin -a stuff -in ${var} -out ${var} ${STATIC} $(var);)

.PHONY: test
Expand Down

0 comments on commit 9131fac

Please sign in to comment.