Skip to content

Commit 537b1ea

Browse files
committed
did I mention I hate goreleaser by now?
1 parent 3b7386d commit 537b1ea

2 files changed

Lines changed: 6 additions & 4 deletions

File tree

.github/workflows/release.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,16 @@ jobs:
2121
uses: actions/setup-go@v5
2222

2323
- name: Extract Release Notes
24+
id: extract_notes
2425
run: |
26+
NOTES_FILE=$(mktemp)
2527
# The tag is in the format vX.Y.Z. We need to extract X.Y.Z.
2628
VERSION=$(echo "${{ github.ref_name }}" | sed 's/^v//')
2729
# Use awk to find the section for the current version and print its content
2830
# until we hit the separator for the next version ('---').
2931
# This extracts the body of the latest changelog entry for the release notes.
30-
awk -v ver="## [$VERSION]" '$0 ~ ver {p=1; next} p && /^---/ {exit} p' CHANGELOG.md > release-notes.md
32+
awk -v ver="## [$VERSION]" '$0 ~ ver {p=1; next} p && /^---/ {exit} p' CHANGELOG.md > "$NOTES_FILE"
33+
echo "notes_path=$NOTES_FILE" >> $GITHUB_OUTPUT
3134
3235
- name: Run GoReleaser
3336
uses: goreleaser/goreleaser-action@v5
@@ -38,7 +41,7 @@ jobs:
3841
# The '--clean' flag removes the 'dist' directory before building.
3942
args: release --clean
4043
# Pass the release notes file directly to the action.
41-
release_notes: release-notes.md
44+
release_notes: ${{ steps.extract_notes.outputs.notes_path }}
4245
env:
4346
# This token is provided by GitHub automatically and is required
4447
# to create a release and upload assets.

CHANGELOG.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1212
- **Import Command:** The `import` command now provides more detailed feedback, reporting errors for invalid key lines instead of skipping them silently.
1313

1414
### Fixed
15-
- **GoReleaser Workflow:** Corrected the method for passing release notes to the `goreleaser-action` by using the dedicated `release_notes` input, resolving the "unknown flag" error.
16-
- **GoReleaser Workflow:** The release workflow now passes release notes via a CLI flag (`--release-notes-file`) to avoid using a GoReleaser Pro feature, fixing release failures.
15+
- **GoReleaser Workflow:** Fixed multiple release failures by updating the workflow to be compatible with GoReleaser v2. This includes using a temporary file for release notes to prevent a "dirty" git workspace and using the correct action inputs.
1716
- **Configuration Discovery:** Keymaster now prints a message when it automatically creates a default `.keymaster.yaml` file, improving user feedback on first run.
1817
- **CLI Parsing:** Improved argument parsing in the `trust-host` command for consistency and robustness.
1918
- **Deployment Compatibility:** The SFTP deployment logic now uses a backup-and-rename strategy, improving compatibility with SFTP servers that do not support atomic overwrites (e.g., on Windows).

0 commit comments

Comments
 (0)