Files
lazysecrets/.gitea/workflows/release.yml
T
renovate-bot BotandKarl-Einar Bergstrøm 51beea9d78 chore(deps): update goreleaser/goreleaser-action action to v7 (#41)
This PR contains the following updates:

| Package | Type | Update | Change | Pending |
|---|---|---|---|---|
| [goreleaser/goreleaser-action](https://github.com/goreleaser/goreleaser-action) | action | major | `v6` → `v7` | `v7.3.0` |

---

### Release Notes

<details>
<summary>goreleaser/goreleaser-action</summary>

### [`v7.2.3`](https://github.com/goreleaser/goreleaser-action/releases/tag/v7.2.3)

[Compare Source](https://github.com/goreleaser/goreleaser-action/compare/v7.2.2...v7.2.3)

#### What's Changed

- ci(deps): bump the actions group with 3 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;563](https://github.com/goreleaser/goreleaser-action/pull/563)
- chore(deps): bump undici from 6.24.1 to 6.27.0 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;565](https://github.com/goreleaser/goreleaser-action/pull/565)
- build: regenerate dist after undici 6.27.0 bump by [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;567](https://github.com/goreleaser/goreleaser-action/pull/567)
- ci: auto-rebuild dist on dependabot PRs by [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;568](https://github.com/goreleaser/goreleaser-action/pull/568)
- ci: use a GitHub App token to rebuild dist on dependabot PRs by [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;569](https://github.com/goreleaser/goreleaser-action/pull/569)

**Full Changelog**: <https://github.com/goreleaser/goreleaser-action/compare/v7.2.2...v7.2.3>

### [`v7.2.2`](https://github.com/goreleaser/goreleaser-action/releases/tag/v7.2.2)

[Compare Source](https://github.com/goreleaser/goreleaser-action/compare/v7.2.1...v7.2.2)

#### What's Changed

- ci(deps): bump the actions group with 3 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;560](https://github.com/goreleaser/goreleaser-action/pull/560)
- fix: nightly resolution to select newest published release by [@&#8203;Copilot](https://github.com/Copilot) in [#&#8203;562](https://github.com/goreleaser/goreleaser-action/pull/562)

#### New Contributors

- [@&#8203;Copilot](https://github.com/Copilot) made their first contribution in [#&#8203;562](https://github.com/goreleaser/goreleaser-action/pull/562)

**Full Changelog**: <https://github.com/goreleaser/goreleaser-action/compare/v7...v7.2.2>

### [`v7.2.1`](https://github.com/goreleaser/goreleaser-action/releases/tag/v7.2.1)

[Compare Source](https://github.com/goreleaser/goreleaser-action/compare/v7.2.0...v7.2.1)

This fully removes the usage of the old `nightly` moving tag.

**Full Changelog**: <https://github.com/goreleaser/goreleaser-action/compare/v7.2.0...v7.2.1>

### [`v7.2.0`](https://github.com/goreleaser/goreleaser-action/releases/tag/v7.2.0)

[Compare Source](https://github.com/goreleaser/goreleaser-action/compare/v7.1.0...v7.2.0)

#### What's Changed

- test: cover install across release eras by [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;555](https://github.com/goreleaser/goreleaser-action/pull/555)
- feat: add `version-file` input by [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;556](https://github.com/goreleaser/goreleaser-action/pull/556)
- feat: resolve nightly to latest vX.Y.Z-<sha>-nightly release by [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;558](https://github.com/goreleaser/goreleaser-action/pull/558)

**Full Changelog**: <https://github.com/goreleaser/goreleaser-action/compare/v7...v7.2.0>

### [`v7.1.0`](https://github.com/goreleaser/goreleaser-action/releases/tag/v7.1.0)

[Compare Source](https://github.com/goreleaser/goreleaser-action/compare/v7.0.0...v7.1.0)

#### What's Changed

- feat: verify release checksum and cosign signature by [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;550](https://github.com/goreleaser/goreleaser-action/pull/550)
- docs: document cosign verification in README by [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;553](https://github.com/goreleaser/goreleaser-action/pull/553)
- docs: Upgrade import GPG action version by [@&#8203;flecno](https://github.com/flecno) in [#&#8203;547](https://github.com/goreleaser/goreleaser-action/pull/547)
- ci: drop docker-bake in favor of plain npm by [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;551](https://github.com/goreleaser/goreleaser-action/pull/551)
- ci: add release-major-tag workflow by [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;552](https://github.com/goreleaser/goreleaser-action/pull/552)
- ci: drop pre-cosign-v3 goreleaser versions from tests by [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;554](https://github.com/goreleaser/goreleaser-action/pull/554)
- ci(deps): bump the actions group with 2 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;543](https://github.com/goreleaser/goreleaser-action/pull/543)
- ci(deps): bump the actions group with 5 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;546](https://github.com/goreleaser/goreleaser-action/pull/546)
- chore(deps): bump undici from 6.23.0 to 6.24.1 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;545](https://github.com/goreleaser/goreleaser-action/pull/545)

#### New Contributors

- [@&#8203;flecno](https://github.com/flecno) made their first contribution in [#&#8203;547](https://github.com/goreleaser/goreleaser-action/pull/547)

**Full Changelog**: <https://github.com/goreleaser/goreleaser-action/compare/v7...v7.1.0>

### [`v7.0.0`](https://github.com/goreleaser/goreleaser-action/releases/tag/v7.0.0)

[Compare Source](https://github.com/goreleaser/goreleaser-action/compare/v6.4.0...v7.0.0)

#### What's Changed

- feat!: node 24, update deps, rm yarn, ESM by [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;533](https://github.com/goreleaser/goreleaser-action/pull/533)
- sec: pin github action versions by [@&#8203;caarlos0](https://github.com/caarlos0) in [#&#8203;514](https://github.com/goreleaser/goreleaser-action/pull/514)
- docs: Upgrade checkout GitHub Action in README.md by [@&#8203;dunglas](https://github.com/dunglas) in [#&#8203;507](https://github.com/goreleaser/goreleaser-action/pull/507)
- chore(deps): bump actions/checkout from 4 to 5 by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;504](https://github.com/goreleaser/goreleaser-action/pull/504)
- ci(deps): bump the actions group with 2 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;517](https://github.com/goreleaser/goreleaser-action/pull/517)
- ci(deps): bump the actions group with 2 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;523](https://github.com/goreleaser/goreleaser-action/pull/523)
- ci(deps): bump docker/bake-action from 6.9.0 to 6.10.0 in the actions group by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;526](https://github.com/goreleaser/goreleaser-action/pull/526)
- ci(deps): bump the actions group across 1 directory with 4 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;532](https://github.com/goreleaser/goreleaser-action/pull/532)
- ci(deps): bump actions/checkout from 6.0.1 to 6.0.2 in the actions group by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;534](https://github.com/goreleaser/goreleaser-action/pull/534)
- chore(deps): bump the npm group across 1 directory with 4 updates by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;536](https://github.com/goreleaser/goreleaser-action/pull/536)
- chore(deps): bump [@&#8203;actions/http-client](https://github.com/actions/http-client) from 3.0.2 to 4.0.0 in the npm group by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;537](https://github.com/goreleaser/goreleaser-action/pull/537)
- ci(deps): bump docker/setup-buildx-action from 3.10.0 to 3.12.0 in the actions group by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;538](https://github.com/goreleaser/goreleaser-action/pull/538)
- chore(deps): bump semver from 7.7.3 to 7.7.4 in the npm group by [@&#8203;dependabot](https://github.com/dependabot)\[bot] in [#&#8203;539](https://github.com/goreleaser/goreleaser-action/pull/539)

**Full Changelog**: <https://github.com/goreleaser/goreleaser-action/compare/v6...v7.0.0>

</details>

---

### Configuration

📅 **Schedule**: (UTC)

- Branch creation
  - "before 6am on monday"
- Automerge
  - At any time (no schedule defined)

🚦 **Automerge**: Disabled by config. Please merge this manually once you are satisfied.

♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 **Ignore**: Close this PR and you won't be reminded about this update again.

---

 - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box

---

This PR has been generated by [Mend Renovate CLI](https://github.com/renovatebot/renovate).
<!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiI0NC4xNTQuMSIsInVwZGF0ZWRJblZlciI6IjQ0LjE1NC4xIiwidGFyZ2V0QnJhbmNoIjoibWFpbiIsImxhYmVscyI6W119-->

---------

Co-authored-by: Karl-Einar Bergstrøm <1+keb@noreply.localhost>
Reviewed-on: #41
Co-authored-by: Renovate Bot <renovate-bot@noreply.git.kebcloud.no>
2026-10-12 21:10:27 +02:00

96 lines
3.6 KiB
YAML

name: Release
# A tag vMAJOR.MINOR.PATCH (or with a suffix, like v0.2.0-rc.1, published
# as a pre-release) tests lazysecrets, then GoReleaser (.goreleaser.yaml)
# builds it for macOS and Linux, arm64 and amd64, and publishes a Gitea
# release with the archives, checksums and this release's section of the
# changelog (git-cliff, cliff.toml), then copies it to the GitHub
# mirror. Pushing the same tag again (after deleting it) replaces the
# release in both places.
#
# scripts/release.sh v0.2.0 # updates CHANGELOG.md, tags and pushes
on:
push:
tags:
- "v*"
jobs:
release:
name: Build and publish
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout (full history, for the changelog)
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
# The runner mounts Go, the module cache and the build cache as
# volumes (nix-config, gitea-runner.nix): nothing to restore.
cache: false
- name: Test
run: |
go vet ./...
go test ./...
- name: Install git-cliff
# Pinned, with checksums.
run: |
set -eo pipefail
V=2.14.2
case "$(uname -m)" in
x86_64) A=x86_64; SUM=26d1f7c8ea2400f2ccb0b2e7f321635f600b583bf4cd1f7afaa5e8c24068ad1088a2504e0a4d9f4333d4bb20a80329327d9462634343ee3af91e1a7fbdc6f18a ;;
aarch64) A=aarch64; SUM=fd27768ea76fea8c3ba3f3247fef2f6604988b629f15e48bf40be5eaa08b8fef2e4087cc9c8af16bc522bc19cc369611fa7692101b513f63469ad58522708600 ;;
*) echo "::error::no git-cliff for $(uname -m)"; exit 1 ;;
esac
F="git-cliff-$V-$A-unknown-linux-gnu.tar.gz"
curl -fsSL -o "$RUNNER_TEMP/$F" "https://github.com/orhun/git-cliff/releases/download/v$V/$F"
echo "$SUM $RUNNER_TEMP/$F" | sha512sum -c -
tar -xzf "$RUNNER_TEMP/$F" -C "$RUNNER_TEMP"
install "$RUNNER_TEMP/git-cliff-$V/git-cliff" /usr/local/bin/
- name: Release notes
env:
TAG: ${{ github.ref_name }}
run: |
set -eo pipefail
# This release's section of the changelog: the feat/fix/perf pull
# requests since the previous release, without its heading (the
# release has a title). A pre-release's tag isn't a release to
# git-cliff (tag_pattern), so it's what's unreleased. Written
# outside the checkout, which GoReleaser wants clean.
if [[ "$TAG" == *-* ]]; then
notes=$(git cliff --unreleased --tag "$TAG" --strip all)
else
notes=$(git cliff --latest --strip all)
fi
printf '%s\n' "$notes" | sed '1{/^## /d;}' | sed '/./,$!d' > "$RUNNER_TEMP/notes.md"
cat "$RUNNER_TEMP/notes.md"
- name: GoReleaser
uses: goreleaser/goreleaser-action@v7
with:
distribution: goreleaser
version: v2.18.3
args: release --clean --release-notes ${{ runner.temp }}/notes.md
env:
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Copy the release to GitHub
# The same notes and files on the GitHub mirror, which lazysecrets
# updates from first (internal/update). GH_RELEASE_TOKEN is a
# fine-grained token that can write the mirror's contents; without
# it the step does nothing.
run: node scripts/github-release.mjs
env:
TAG: ${{ github.ref_name }}
GH_TOKEN: ${{ secrets.GH_RELEASE_TOKEN }}
GITEA_TOKEN: ${{ secrets.GITHUB_TOKEN }}