BeiBaiNian opened a new pull request, #96:
URL: https://github.com/apache/casbin-jcasbin-jdbc-adapter/pull/96

   ## Summary
   
   Related: apache/casbin#1747
   
   Following up on #95 (which removed the semantic-release auto-publishing 
step), this PR adds a manual, tag-triggered release workflow to replace it, as 
requested in apache/casbin#1747.
   
   Since Casbin is now under Apache Incubator, releases must go through a 
community vote before publishing. Therefore, releases can no longer be 
published automatically on every merge to master. Instead, a release manager 
pushes a git tag manually, and the CI publishes accordingly:
   
   - `v1.4.0-rc1` (with `-rcN` suffix) → GitHub **pre-release** only. This is 
the candidate artifact used for the Apache release vote.
   - `v1.4.0` (no suffix) → GitHub **release** + publish to **Maven Central**.
   
   The source package attached to both GitHub releases follows the Apache 
Incubator naming convention 
(`apache-casbin-jcasbin-jdbc-adapter-<version>-incubating-src.tar.gz` with a 
SHA-512 checksum), so the release manager can download it, sign it locally with 
their own GPG key, and use it for the vote. The workflow deliberately does 
**not** do anything beyond these two cases (no signing, no upload to 
dist.apache.org).
   
   ## Changes
   
   - Add `.github/workflows/release.yml`: tag-triggered release workflow.
     - `prepare` job: parses the tag. Accepts `vX.Y.Z` (final) and `vX.Y.Z-rcN` 
(release candidate); rejects other tag formats.
     - `github-release` job: generates release notes, builds the Apache-style 
source package (`.tar.gz` + `.sha512`), and creates the GitHub release 
(pre-release for `-rcN` tags, regular release otherwise).
     - `publish-maven` job: only for final releases (`prerelease == 'false'`), 
calls the reusable `maven-publish.yml` workflow.
   - Add `.github/workflows/maven-publish.yml`: reusable Maven Central 
publishing workflow (`workflow_call` + `workflow_dispatch`). Aligns the pom 
version with the tag via `versions-maven-plugin`, then runs `mvn deploy` with 
JDK 1.8.
   - `maven-ci.yml` is left untouched (auto-publishing was already removed in 
#95).
   
   ## Verification
   
   - Locally simulated the full release flow:
     - Tag parsing: `v2.6.0-rc1` → pre-release, `v2.6.0` → release, 
`v3.0.0-rc2` → pre-release; invalid formats are rejected.
     - Source package: `git archive` produces 
`apache-casbin-jcasbin-jdbc-adapter-2.6.0-rc1-incubating-src.tar.gz` with a 
single top-level directory; SHA-512 checksum generation and verification pass.
     - Maven build: `versions:set` to `2.6.0` + `mvn package` succeeds under 
JDK 1.8 (jar, sources jar, javadoc jar all produced).
   - The new YAML files pass GitHub Actions syntax validation.
   - `mvn deploy` to Maven Central and actual GitHub release creation require 
repository secrets and can only be verified on a real tag push.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to