Skip to content

ci: gate Maven Central publish on maven-central environment#31

Merged
endrju19 merged 1 commit intomainfrom
ci/environment-maven-central
Apr 29, 2026
Merged

ci: gate Maven Central publish on maven-central environment#31
endrju19 merged 1 commit intomainfrom
ci/environment-maven-central

Conversation

@endrju19
Copy link
Copy Markdown
Collaborator

@endrju19 endrju19 commented Apr 29, 2026

Summary

Adds environment: maven-central to the publish job in .github/workflows/ci.yml.

The maven-central environment has been configured in repository settings with:

  • Required reviewers — human approval gate before publish
  • Deployment tag rule — only refs matching v* can trigger deployment

Effect

Pushing a v0.X.Y tag no longer triggers an immediate publish to Maven Central. Instead:

  1. CI runs through buildspring-compatkafka-compat as before
  2. publish job reaches the gate and pauses in Waiting for review state
  3. An approver clicks Approve and deploy in the Actions UI
  4. Then ./gradlew publishAndReleaseToMavenCentral runs

This protects against accidental tags, compromised maintainer accounts, and race conditions.

Test plan

  • YAML formatting preserved (1-line insertion only — verified with git diff)
  • Verified after merge: a future v* tag push pauses in Waiting for review

Add `environment: maven-central` to the publish job. Deployment
gating is configured on the GitHub environment side.

CI YAML only — no build/code changes.
@endrju19 endrju19 force-pushed the ci/environment-maven-central branch from ba0de85 to 49a945b Compare April 29, 2026 12:33
@endrju19 endrju19 merged commit b42d914 into main Apr 29, 2026
8 checks passed
@endrju19 endrju19 deleted the ci/environment-maven-central branch April 29, 2026 12:35
@endrju19 endrju19 mentioned this pull request Apr 29, 2026
4 tasks
endrju19 added a commit that referenced this pull request Apr 29, 2026
Bumps `VERSION_NAME` from `0.1.0` to `0.2.0` ahead of release.

After this merges I will create the `v0.2.0` tag, which will trigger the
publish job (gated on `maven-central` environment — needs your approval
in the Actions UI).

## What's in v0.2.0

The auto-generated draft is at
https://github.com/softwaremill/okapi/releases — covers ~15 PRs since
v0.1.0, including:

- Observability module `okapi-micrometer` (#27, #29)
- Outbox processor scheduler refactor (#16, #17)
- Migration `OutboxStore` → plain JDBC (#26)
- `@Jvm*` annotations for Java interop (#24)
- CI hardening (environment gate #31)

## Test plan

- [x] `./gradlew build` zielone na main przed bumpem (CI on every
preceding PR)
- [ ] After merge: `git tag v0.2.0 && git push --tags`
- [ ] Approve `Publish to Maven Central` job in Actions UI
- [ ] Verify artifacts on
https://repo1.maven.org/maven2/com/softwaremill/okapi/
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