From 9ffe3982fdf8a7464bd95c4212e3fe996f03cc1d Mon Sep 17 00:00:00 2001 From: Tchoupinax Date: Mon, 12 Aug 2024 18:39:54 +0200 Subject: [PATCH 1/2] ci: fix build binary --- .github/workflows/build-binary.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/build-binary.yml b/.github/workflows/build-binary.yml index 7a03a19..58e0534 100644 --- a/.github/workflows/build-binary.yml +++ b/.github/workflows/build-binary.yml @@ -1,8 +1,9 @@ -name: Build binary +name: Release binary on: - pull_request: - branches: + push: + tags: + - "*" jobs: build-binary: @@ -27,6 +28,6 @@ jobs: uses: goreleaser/goreleaser-action@v6 with: version: v2.1.0 - args: build --snapshot + args: release env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 679da59ff32cc589b58cb0f7b9b1ca6e654b10cd Mon Sep 17 00:00:00 2001 From: Tchoupinax Date: Mon, 12 Aug 2024 20:30:35 +0200 Subject: [PATCH 2/2] ci: fix correct file --- .github/workflows/build-binary.yml | 9 ++++----- .github/workflows/release-binary.yml | 25 ++++++++----------------- 2 files changed, 12 insertions(+), 22 deletions(-) diff --git a/.github/workflows/build-binary.yml b/.github/workflows/build-binary.yml index 58e0534..7a03a19 100644 --- a/.github/workflows/build-binary.yml +++ b/.github/workflows/build-binary.yml @@ -1,9 +1,8 @@ -name: Release binary +name: Build binary on: - push: - tags: - - "*" + pull_request: + branches: jobs: build-binary: @@ -28,6 +27,6 @@ jobs: uses: goreleaser/goreleaser-action@v6 with: version: v2.1.0 - args: release + args: build --snapshot env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/release-binary.yml b/.github/workflows/release-binary.yml index ff1065f..d9221c8 100644 --- a/.github/workflows/release-binary.yml +++ b/.github/workflows/release-binary.yml @@ -1,16 +1,16 @@ -name: Releases publication +name: Releases binary on: push: tags: - - '*' + - "*" jobs: goreleaser: runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 @@ -20,23 +20,14 @@ jobs: echo "Using Go version ${{ steps.vars.outputs.go_version }}" - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 with: go-version: ${{ steps.vars.outputs.go_version }} - name: Compile the source - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v6 with: - version: latest - args: build --rm-dist --skip-validate + version: v2.1.0 + args: release env: - GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} - - - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 - with: - distribution: goreleaser - version: latest - args: release --rm-dist - env: - GITHUB_TOKEN: ${{ secrets.TOKEN_GITHUB }} + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}