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 \