From a9420cfdc540d61f2ac74e9cac30a7c79c95d43c Mon Sep 17 00:00:00 2001 From: Remco Beckers Date: Tue, 20 Aug 2024 10:46:18 +0200 Subject: [PATCH 1/3] Fix go-releaser config --- .goreleaser.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.goreleaser.yml b/.goreleaser.yml index 7f6df5b..ad4cab8 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,3 +1,4 @@ +version: 2 project_name: trafficmirror release: github: @@ -19,7 +20,7 @@ builds: checksum: name_template: checksums.txt snapshot: - name_template: "{{ .Tag }}-next" + version_template: "{{ .Tag }}-next" changelog: sort: asc filters: From 0a5e5048908ad757c3102bda8e6538286acad70d Mon Sep 17 00:00:00 2001 From: Remco Beckers Date: Tue, 20 Aug 2024 10:51:32 +0200 Subject: [PATCH 2/3] Upgrade github actions --- .github/workflows/codeql-analysis.yml | 8 ++++---- .github/workflows/go-build.yml | 15 ++++++++------- .github/workflows/release.yml | 11 ++++++----- 3 files changed, 18 insertions(+), 16 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 3341d7a..9d87cee 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -38,11 +38,11 @@ jobs: steps: - name: Checkout repository - uses: actions/checkout@v2 + uses: actions/checkout@v4 # Initializes the CodeQL tools for scanning. - name: Initialize CodeQL - uses: github/codeql-action/init@v1 + uses: github/codeql-action/init@v3 with: languages: ${{ matrix.language }} # If you wish to specify custom queries, you can do so here or in a config file. @@ -53,7 +53,7 @@ jobs: # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). # If this step fails, then you should remove it and run the build manually (see below) - name: Autobuild - uses: github/codeql-action/autobuild@v1 + uses: github/codeql-action/autobuild@v3 # ℹī¸ Command-line programs to run using the OS shell. # 📚 https://git.io/JvXDl @@ -67,4 +67,4 @@ jobs: # make release - name: Perform CodeQL Analysis - uses: github/codeql-action/analyze@v1 + uses: github/codeql-action/analyze@v3 diff --git a/.github/workflows/go-build.yml b/.github/workflows/go-build.yml index 62f57b9..1f69e72 100644 --- a/.github/workflows/go-build.yml +++ b/.github/workflows/go-build.yml @@ -13,26 +13,27 @@ jobs: steps: - name: Set up Go 1.x id: go - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 with: go-version: ^1.21 + cache-dependency-path: "./go.sum" - name: Check out code into the Go module directory - uses: actions/checkout@v2 + uses: actions/checkout@v4 - name: Check GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser - version: latest + version: v2 args: check - name: Compile - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser - version: latest - args: build --rm-dist --snapshot + version: v2 + args: build --clean --snapshot - name: Get dependencies run: | diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index db1b499..74f401a 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -20,14 +20,15 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 0 - name: Set up Go - uses: actions/setup-go@v2 + uses: actions/setup-go@v5 with: go-version: ^1.21 + cache-dependency-path: "./go.sum" - name: Login to GitHub Container Registry uses: docker/login-action@v3 @@ -37,10 +38,10 @@ jobs: password: ${{ secrets.GITHUB_TOKEN }} - name: Run GoReleaser - uses: goreleaser/goreleaser-action@v2 + uses: goreleaser/goreleaser-action@v6 with: distribution: goreleaser - version: latest - args: release --rm-dist + version: v2 + args: release --clean env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 34f283ff345a984abbc029c3358e2d72a5958d14 Mon Sep 17 00:00:00 2001 From: Remco Beckers Date: Tue, 20 Aug 2024 12:16:35 +0200 Subject: [PATCH 3/3] Disable caching, it doesn't work and produces a warning --- .github/workflows/go-build.yml | 2 +- .github/workflows/release.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/go-build.yml b/.github/workflows/go-build.yml index 1f69e72..8d37b3a 100644 --- a/.github/workflows/go-build.yml +++ b/.github/workflows/go-build.yml @@ -16,7 +16,7 @@ jobs: uses: actions/setup-go@v5 with: go-version: ^1.21 - cache-dependency-path: "./go.sum" + cache: false - name: Check out code into the Go module directory uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 74f401a..de14aa4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,7 +28,7 @@ jobs: uses: actions/setup-go@v5 with: go-version: ^1.21 - cache-dependency-path: "./go.sum" + cache: false - name: Login to GitHub Container Registry uses: docker/login-action@v3