Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
version: 2

before:
hooks:
- "cp plugin.json plugin.json.orig"
- "sed -i.bak 's/\"version\": \".*\"/\"version\": \"{{ .Version }}\"/' plugin.json && rm -f plugin.json.bak"
Comment on lines +3 to +6
Copy link

Copilot AI Mar 12, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The before.hooks command rewrites plugin.json in-place and does not restore it afterward. Running GoReleaser locally (or in CI retries) will leave the working tree dirty and, if the release fails mid-run, the repo may be left with a modified plugin.json. Consider writing the versioned manifest to a separate file (e.g., under dist/) and archiving that, or add a follow-up step to restore plugin.json from the backup once artifacts are produced (if supported by your GoReleaser version).

Copilot uses AI. Check for mistakes.

after:
hooks:
- "mv plugin.json.orig plugin.json"

builds:
- main: ./cmd/workflow-plugin-authz
binary: workflow-plugin-authz
Expand Down
2 changes: 1 addition & 1 deletion plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "workflow-plugin-authz",
"version": "1.0.0",
"version": "0.0.0-dev",
"description": "RBAC authorization plugin using Casbin",
"author": "GoCodeAlone",
"license": "MIT",
Expand Down
Loading