From a4bcf1fa43c1fa40d12945a38178fdde6108efd2 Mon Sep 17 00:00:00 2001 From: Joao Pereira Date: Wed, 10 Jun 2026 15:55:48 +0100 Subject: [PATCH] Update all the github actions to latest versions Signed-off-by: Joao Pereira --- .github/workflows/release.yml | 14 +++++++------- .goreleaser.yml | 10 +++------- 2 files changed, 10 insertions(+), 14 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7d418b21..ca7b154f 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -28,16 +28,16 @@ jobs: id: version - name: Run GoReleaser - # GoReleaser v4.2.0 - uses: goreleaser/goreleaser-action@f82d6c1c344bcacabba2c841718984797f664a6b + # GoReleaser v7.2.2 + uses: goreleaser/goreleaser-action@5daf1e915a5f0af01ddbcd89a43b8061ff4f1a89 if: startsWith(github.ref, 'refs/tags/') with: - version: 1.16.2 - args: release --rm-dist --debug ${{ env.SKIP_PUBLISH }} + version: "~> v2" + args: release --clean --verbose ${{ env.SKIP_PUBLISH }} env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GORELEASER_CURRENT_TAG: ${{ steps.version.outputs.TAG_NAME }} - - uses: actions/github-script@v4 + - uses: actions/github-script@v9 id: get-checksums-from-draft-release if: startsWith(github.ref, 'refs/tags/') && ${{ !env.ACT }} with: @@ -49,7 +49,7 @@ jobs: // https://docs.github.com/en/rest/reference/repos#list-releases // https://octokit.github.io/rest.js/v18#repos-list-releases - var releases = await github.repos.listReleases({ + var releases = await github.rest.repos.listReleases({ owner: owner, repo: repo }); @@ -63,7 +63,7 @@ jobs: for (const r of releases["data"]) { if (r.draft && `refs/tags/${r.tag_name}` == "${{ github.ref }}") { for (const asset of r.assets) { - var release_asset = await github.repos.getReleaseAsset({ headers: {accept: `application/octet-stream`}, accept: `application/octet-stream`, owner: owner, repo: repo, asset_id: asset.id }); + var release_asset = await github.rest.repos.getReleaseAsset({ headers: {accept: `application/octet-stream`}, accept: `application/octet-stream`, owner: owner, repo: repo, asset_id: asset.id }); const hash = crypto.createHash('sha256'); let http_promise = new Promise((resolve, reject) => { diff --git a/.goreleaser.yml b/.goreleaser.yml index 776ac465..1d7175ba 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,5 +1,6 @@ # This is an example .goreleaser.yml file with some sane defaults. # Make sure to check the documentation at http://goreleaser.com +version: 2 builds: - env: - CGO_ENABLED=0 @@ -25,11 +26,6 @@ builds: archives: - format: binary name_template: "{{ .Binary }}" - replacements: - darwin: Darwin - linux: Linux - windows: Windows - amd64: x86_64 checksum: name_template: 'checksums.txt' algorithm: sha256 @@ -46,7 +42,7 @@ signs: - '${artifact}' output: true snapshot: - name_template: "{{ .Tag }}-next" + version_template: "{{ .Tag }}-next" release: # Repo in which the release will be created. github: @@ -129,7 +125,7 @@ release: changelog: # Set it to true if you wish to skip the changelog generation. # This may result in an empty release notes on GitHub/GitLab/Gitea. - skip: false + disable: false # Sorts the changelog by the commit's messages. # Could either be asc, desc or empty