From ef39e24a1b8026e321910fe751158a7f82b677df Mon Sep 17 00:00:00 2001 From: Alberto Montes Date: Mon, 23 May 2022 21:44:26 +0200 Subject: [PATCH] Remove goreleaser on pull requests This will always fail for external contributors and is not what we want. The releases only need to happen on tags in the repository. --- .github/workflows/build-goreleaser.yml | 32 -------------------------- .github/workflows/build.yml | 6 ++--- .github/workflows/release.yml | 16 +++++-------- 3 files changed, 9 insertions(+), 45 deletions(-) delete mode 100644 .github/workflows/build-goreleaser.yml diff --git a/.github/workflows/build-goreleaser.yml b/.github/workflows/build-goreleaser.yml deleted file mode 100644 index 16c0a23..0000000 --- a/.github/workflows/build-goreleaser.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: goreleaser - -on: - pull_request: - push: - -jobs: - goreleaser: - runs-on: ubuntu-latest - steps: - - name: Login to Docker Registry - run: | - echo "${{ secrets.DOCKERHUB_TOKEN }}" | \ - docker login -u gaetancollaud --password-stdin - - - name: Checkout - uses: actions/checkout@v2 - with: - fetch-depth: 0 - - - name: Set up Go - uses: actions/setup-go@v2 - with: - go-version: 1.16 - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 - with: - version: latest - args: release --rm-dist --snapshot - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 87cbb3b..2a71494 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,13 +1,13 @@ name: Golang CI -on: [ push, pull_request ] +on: [push, pull_request] jobs: build: strategy: matrix: - go-version: [ 1.16.x ] - os: [ ubuntu-latest, macos-latest, windows-latest ] + go-version: [1.18.x] + os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} env: GOPATH: ${{ github.workspace }} diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ebe2d22..5e81436 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,30 +3,26 @@ name: Release on: push: tags: - - '*' + - "*" jobs: release: runs-on: ubuntu-latest steps: - - - name: Login to Docker Registry + - name: Login to Docker Registry run: | echo "${{ secrets.DOCKERHUB_TOKEN }}" | \ docker login -u gaetancollaud --password-stdin \ && docker info - - - name: Checkout + - name: Checkout uses: actions/checkout@v2 with: fetch-depth: 0 - - - name: Set up Go + - name: Set up Go uses: actions/setup-go@v2 with: - go-version: 1.16 - - - name: Run GoReleaser + go-version: 1.18 + - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 if: startsWith(github.ref, 'refs/tags/') with: