move goreleaser to makefile
This commit is contained in:
parent
ba307fb811
commit
74be19bf98
19
.github/workflows/pipeline.yml
vendored
19
.github/workflows/pipeline.yml
vendored
@ -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 }}
|
||||
|
||||
|
12
Makefile
12
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 \
|
||||
|
Loading…
x
Reference in New Issue
Block a user