y-scope / clp-ffi-java

Apache License 2.0
10 stars 3 forks source link

gh-actions: Refactor and combine build and release workflows. #48

Closed kirkrodrigues closed 1 week ago

kirkrodrigues commented 1 week ago

Description

Currently, we have two workflows that are nearly identical except that one publishes to GitHub packages and the other publishes to Maven Central.

This PR consolidates them into one using GitHub's job conditionals. Specifically:

  1. On pushes to main, the build workflow will now build and publish to GitHub packages.
  2. On workflow triggers from a branch starting with "v", the build workflow will now build and publish to Maven Central.
  3. In all other cases, the workflow will only build and not publish.

This PR also:

Validation performed

In my fork, validated that the workflows succeed in all 3 cases listed above.