Skip to content

Conversation

@ChochaNaresh
Copy link
Owner

This commit introduces a GitHub Actions workflow to automatically publish releases to Maven Central when a new tag is pushed.

Key changes:

  • Added a new publish job to the ci.yml workflow.
  • This job triggers on pushes to tags (e.g., v1.0.0, v1.0.0-alpha1).
  • It extracts the version from the Git tag.
  • It detects the release type (alpha, beta, stable) based on the tag name.
  • It restores gradle.properties from secrets.
  • It imports a GPG key for signing artifacts.
  • It publishes artifacts to Maven Central using the publishAllPublicationsToMavenCentral Gradle task.
  • It creates a GitHub Release with the published artifacts and release notes.

Gradle changes:

  • Added com.vanniktech.maven.publish and signing plugins to libs.versions.toml and the root build.gradle.kts.
  • Configured the maven-publish plugin in formz/build.gradle.kts to:
    • Publish to Maven Central.
    • Sign all publications.
    • Set coordinates, POM details (name, description, license, developers, SCM).
  • Removed the previous manual maven-publish configuration from formz/build.gradle.kts.
  • The version name is now derived from the VERSION_NAME project property, falling back to a default if not set.

A secring.gpg file has been added, presumably containing the GPG secret key for signing, though its content is binary and not displayed in the diff.

✨ What's Changed

Describe the changes you made in this PR.

✅ Checklist

  • ✅ I've tested this on a device/emulator
  • ✅ I've added tests where applicable
  • ✅ I've updated documentation (if needed)
  • ✅ This PR follows the CONTRIBUTING.md guidelines

This commit introduces a GitHub Actions workflow to automatically publish releases to Maven Central when a new tag is pushed.

Key changes:
- Added a new `publish` job to the `ci.yml` workflow.
- This job triggers on pushes to tags (e.g., `v1.0.0`, `v1.0.0-alpha1`).
- It extracts the version from the Git tag.
- It detects the release type (alpha, beta, stable) based on the tag name.
- It restores `gradle.properties` from secrets.
- It imports a GPG key for signing artifacts.
- It publishes artifacts to Maven Central using the `publishAllPublicationsToMavenCentral` Gradle task.
- It creates a GitHub Release with the published artifacts and release notes.

Gradle changes:
- Added `com.vanniktech.maven.publish` and `signing` plugins to `libs.versions.toml` and the root `build.gradle.kts`.
- Configured the `maven-publish` plugin in `formz/build.gradle.kts` to:
    - Publish to Maven Central.
    - Sign all publications.
    - Set coordinates, POM details (name, description, license, developers, SCM).
- Removed the previous manual `maven-publish` configuration from `formz/build.gradle.kts`.
- The version name is now derived from the `VERSION_NAME` project property, falling back to a default if not set.

A `secring.gpg` file has been added, presumably containing the GPG secret key for signing, though its content is binary and not displayed in the diff.
@ChochaNaresh ChochaNaresh merged commit f87114a into master Jun 27, 2025
3 checks 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.

1 participant