Skip to content

Add release workflow (tag → GitHub Release with jar) - #6

Merged
MrPippi merged 1 commit into
mainfrom
cc/charming-keller-a0vyen
Oct 9, 2026
Merged

MrPippi merged 1 commit into
mainfrom
cc/charming-keller-a0vyen

Conversation

@MrPippi

@MrPippi MrPippi commented Oct 9, 2026 •

Copy link
Copy Markdown
Owner

Summary

Adds .github/workflows/release.yml, which builds the plugin for a tag and publishes it as a GitHub Release with the jar attached.

Why: we want v1.0.0 released at 6c3257c for Paper 1.21.x users. The session that prepared this can only push to its working branch, so it cannot push tags (HTTP 403), and its GitHub tools have no way to create a release. Doing it with GITHUB_TOKEN inside Actions works, and the same workflow can publish v2.0.0 and later versions.

How it runs

  • Tag push v*: releases that tag, built on JDK 25.
  • Manual run (Actions → Release → Run workflow) takes these inputs:
    • tag: required
    • target: the commit to tag, needed only if the tag doesn't exist yet
    • java-version: defaults to 25; 1.x needs 21
  • Build: uses ./mvnw -B verify, or plain mvn for commits that predate the wrapper (such as 6c3257c), so tests must pass before anything is published.
  • Release notes: the matching ## [x.y.z] section of CHANGELOG.md on main. If there is no matching section, a one-line placeholder is used.
  • Tag creation: gh release create --target <sha> creates the tag on the server. Tags created by GITHUB_TOKEN do not re-trigger the workflow, so there is no double run.
  • Security: workflow inputs reach shell steps only through env, never by interpolating them into scripts. Permissions are contents: write only.

After merge

Run it with tag=v1.0.0, target=6c3257c1…, java-version=21.

Test plan

  • The YAML parses. I ran the CHANGELOG extraction locally for 1.0.0, 2.0.0 and an unknown version: correct sections, reference links stripped, and empty output for the unknown version.
  • Build CI is green on this PR (the release workflow itself only runs on tags or manually)
  • After merge, a manual run for v1.0.0 creates the tag and a release with AutoPickup-1.0.0.jar

🤖 Generated with Claude Code

https://claude.ai/code/session_018syaxkhsW9ioZChSmth9Xx


Generated by Claude Code

Runs on a v* tag push, or manually with tag / target / java-version
inputs so older commits (e.g. 1.0.0, which needs JDK 21) can be released
too; the tag is created at target if it doesn't exist. Builds with
./mvnw when present (falls back to mvn), attaches the jar, and uses the
matching CHANGELOG.md section from main as release notes. Workflow
inputs reach shell steps only through env vars.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018syaxkhsW9ioZChSmth9Xx
@MrPippi
MrPippi marked this pull request as ready for review October 9, 2026 02:20
@MrPippi
MrPippi merged commit fa7d59e into main Oct 9, 2026
1 check passed
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.

2 participants