Skip to content

Commit

Permalink
Automate publishing process to Maven Central via the GitHub CI
Browse files Browse the repository at this point in the history
  • Loading branch information
besidev committed Oct 30, 2024
1 parent 3d484b2 commit a29119b
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: CI Release

on:
release:

env:
BRANCH_NAME: ${{github.ref_name}}
TRUNK_BRANCH_NAME: 'main'
MAVEN_CENTRAL_PUBLISHING_TYPE: 'USER_MANAGED'

jobs:
release:
name: 'Release'
runs-on: ubuntu-24.04
if: github.repository.owner == 'JPro-one'
steps:
- name: Verify Branch
if: env.BRANCH_NAME != env.TRUNK_BRANCH_NAME
run: |
echo "ERROR: Attempting to release from branch ${{env.BRANCH_NAME}}. Release from ${{env.TRUNK_BRANCH_NAME}} branch only"
exit 1
- name: Checkout
uses: actions/checkout@v4

- name: Setup Java 21
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 21

- name: Publish to Sandec Public Repository
run: |
./gradlew clean publish
- name: Publish to Maven Central Sonatype
run: |
./gradlew publishToMavenCentralPortal
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
### 0.4.3 (TBA)

* Configure publishing of the all JPro Platform modules to the Maven Central repository.

----------------------

### 0.4.2 (October 18, 2024)
Expand Down

0 comments on commit a29119b

Please sign in to comment.