summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Goodman <wagoodman@gmail.com>2019-11-20 12:19:17 -0800
committerAlex Goodman <wagoodman@gmail.com>2019-11-20 14:50:32 -0800
commit74be19bf988efe92a83a8dcdececf993fbaf32e7 (patch)
treee26d31e058f9dd44190e7b6938a00eb6fa18b6af
parentba307fb811bdba7f7dbe0922950df1423aa82710 (diff)
move goreleaser to makefile
-rw-r--r--.github/workflows/pipeline.yml19
-rw-r--r--Makefile12
2 files changed, 21 insertions, 10 deletions
diff --git a/.github/workflows/pipeline.yml b/.github/workflows/pipeline.yml
index ab11718..30b075a 100644
--- a/.github/workflows/pipeline.yml
+++ b/.github/workflows/pipeline.yml
@@ -43,8 +43,10 @@ jobs:
- uses: actions/checkout@v1
- - name: Install go tools
- run: make ci-install-go-tools
+ - name: Install tooling
+ run: |
+ make ci-install-go-tools
+ make ci-install-ci-tools
- name: Cache go dependencies
id: package-cache-go-dependencies
@@ -62,10 +64,7 @@ jobs:
run: make ci-static-analyses
- name: Build snapshot artifacts
- uses: goreleaser/goreleaser-action@v1
- with:
- version: latest
- args: release --snapshot --skip-publish --rm-dist
+ run: make ci-build-snapshot-packages
- run: docker images wagoodman/dive
@@ -145,6 +144,9 @@ jobs:
- uses: actions/checkout@v1
+ - name: Install tooling
+ run: make ci-install-ci-tools
+
- name: Cache go dependencies
id: release-cache-go-dependencies
uses: actions/cache@v1
@@ -164,10 +166,7 @@ jobs:
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
- name: Publish GitHub release
- uses: goreleaser/goreleaser-action@v1
- with:
- version: "v0.123.0"
- args: release --rm-dist
+ run: make ci-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
diff --git a/Makefile b/Makefile
index 5dcda3b..df98836 100644
--- a/Makefile
+++ b/Makefile
@@ -21,6 +21,9 @@ ci-static-analyses:
ci-install-go-tools:
curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sudo sh -s -- -b /usr/local/bin/ latest
+ci-install-ci-tools:
+ curl -sfL https://install.goreleaser.com/github.com/goreleaser/goreleaser.sh | sudo sh -s -- -b /usr/local/bin/ "v0.122.0"
+
ci-docker-login:
echo '${DOCKER_PASSWORD}' | docker login -u '${DOCKER_USERNAME}' --password-stdin '${PRODUCTION_REGISTRY}'
@@ -30,6 +33,15 @@ ci-docker-logout:
ci-publish-release:
goreleaser --rm-dist
+ci-build-snapshot-packages:
+ goreleaser \
+ --snapshot \
+ --skip-publish \
+ --rm-dist
+
+ci-release:
+ release --rm-dist
+
# todo: add --pull=never when supported by host box
ci-test-production-image:
docker run \