Skip to content

ci: publish latest jar to a stable release - #7

Merged
JustinasLa merged 2 commits into
mainfrom
ci/publish-latest-release
Sep 10, 2026
Merged

JustinasLa merged 2 commits into
mainfrom
ci/publish-latest-release

Conversation

@JustinasLa

@JustinasLa JustinasLa commented Sep 10, 2026 •

Copy link
Copy Markdown
Contributor

Adds a publish job that runs only on push to main and uploads the
built jar to a fixed latest-tagged GitHub Release, so the newest
jar is always at a stable URL instead of a per-commit artifact SHA.

  • build job stays permissions: contents: read, unchanged behavior.
  • publish job (needs: build) gets its own contents: write,
    downloads the jar the build job already produced instead of
    rebuilding, and runs only when github.event_name == 'push' && github.ref == 'refs/heads/main'.
  • Own concurrency group without cancel-in-progress, so a rapid
    double-push can't cancel an in-flight release upload mid-write.
  • Explicit if/else for the create-or-update logic instead of a
    &&/|| chain, so a real upload failure isn't masked by a
    misleading "release already exists" error.

Reviewed by code-reviewer (APPROVE) and security-specialist (PASS),
both 0 CRITICAL/HIGH; the MEDIUM findings from both are addressed
above.

JustinasLa and others added 2 commits September 10, 2026 23:30
Adds a publish job, gated to push-on-main, that uploads the built
jar to a fixed `latest`-tagged release so it can be downloaded from
a stable URL instead of hunting a run SHA. Kept as a separate job
with its own contents:write permission and concurrency group so the
build job stays read-only and a rapid double-push can't cancel an
in-flight upload.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@JustinasLa
JustinasLa merged commit 97da8a5 into main Sep 10, 2026
2 checks passed
@JustinasLa
JustinasLa deleted the ci/publish-latest-release branch September 10, 2026 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant