-
Notifications
You must be signed in to change notification settings - Fork 2
Feature/release 1 #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 17 commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
8097bdd
Bump version to 0.9.5
bartsli 60482c9
Add GitHub Actions workflow for Maven Central publishing
bartsli 3a2d7e9
Update GitHub Actions workflow with improved GPG configuration
bartsli fd488c8
Add GPG key listing and disable GPG agent in Maven configuration
bartsli 465195e
Simplify GPG key import process
bartsli d033637
Add debug mode to Maven Central workflow
bartsli 7c7c8ee
Enhance GPG key setup and add more diagnostic information
bartsli 26a2ee3
Enhance GPG configuration with explicit default key and agent settings
bartsli 2937b68
Add feature/release-1 branch trigger to Maven Central workflow
bartsli f191a97
Add more debug flags to Maven command
bartsli dc498e2
Use non-interactive GPG trust mode
bartsli 61dd7a8
Modify GPG trust configuration
bartsli ead5cdc
Enhance GPG configuration with more debugging and direct trust setting
bartsli a02c5e7
Simplify GPG configuration and downgrade maven-gpg-plugin
bartsli 85fabd7
Add Maven settings.xml configuration
bartsli 9b83619
Fix Sonatype OSSRH authentication configuration
bartsli 982e8cf
Pass Sonatype OSSRH credentials directly in Maven commands
bartsli 36586e6
Add Sonatype credentials verification step
bartsli 0b73028
Update URLs to Central Publishing Portal while keeping OSSRH secrets
bartsli b9a4b39
Update nexus-staging-maven-plugin URL to Central Publishing Portal
bartsli 04ee3ed
Update deployment URLs to new Central Publishing Portal API endpoints
bartsli 8ae3096
Replace nexus-staging-maven-plugin with central-publishing-maven-plugin
bartsli 2383aa7
Update to new Central Publishing Portal API
bartsli 034a31f
Update workflow to use new Central Publishing Portal API
bartsli 0f24e09
Replace nexus-staging-maven-plugin with central-publishing-maven-plugin
bartsli 678d4e8
Update server ID to central for Central Publishing Portal
bartsli 9c75975
Remove debug flags from Maven build
bartsli 716d5a1
Add MIT license information
bartsli File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,116 @@ | ||
name: Publish to Maven Central | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
branches: | ||
- 'feature/release-1' | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up JDK 8 | ||
uses: actions/setup-java@v4 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
cache: 'maven' | ||
|
||
- name: Setup GPG | ||
run: | | ||
echo "Setting up GPG..." | ||
mkdir -p ~/.gnupg | ||
chmod 700 ~/.gnupg | ||
|
||
# Import private key | ||
echo "${{ secrets.GPG_PRIVATE_KEY }}" > private.key | ||
echo "Importing GPG key..." | ||
gpg --batch --import private.key | ||
rm private.key | ||
|
||
# Configure GPG | ||
echo "Configuring GPG..." | ||
cat > ~/.gnupg/gpg.conf << EOF | ||
default-key ${{ secrets.GPG_KEYNAME }} | ||
use-agent | ||
pinentry-mode loopback | ||
EOF | ||
|
||
# Debug information | ||
echo "=== GPG Keys ===" | ||
gpg --list-secret-keys --keyid-format LONG | ||
gpg --list-keys --keyid-format LONG | ||
|
||
- name: Configure Maven | ||
run: | | ||
mkdir -p ~/.m2 | ||
cat > ~/.m2/settings.xml << EOF | ||
<settings> | ||
<servers> | ||
<server> | ||
<id>ossrh</id> | ||
<username>${{ secrets.OSSRH_USERNAME_TOKEN }}</username> | ||
<password>${{ secrets.OSSRH_PASSWORD_TOKEN }}</password> | ||
</server> | ||
</servers> | ||
<profiles> | ||
<profile> | ||
<id>ossrh</id> | ||
<activation> | ||
<activeByDefault>true</activeByDefault> | ||
</activation> | ||
<properties> | ||
<gpg.executable>gpg</gpg.executable> | ||
<gpg.passphrase>${{ secrets.GPG_PASSPHRASE }}</gpg.passphrase> | ||
</properties> | ||
</profile> | ||
</profiles> | ||
</settings> | ||
EOF | ||
|
||
- name: Build and Publish | ||
env: | ||
OSSRH_USERNAME: ${{ secrets.OSSRH_USERNAME_TOKEN }} | ||
OSSRH_PASSWORD: ${{ secrets.OSSRH_PASSWORD_TOKEN }} | ||
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
run: | | ||
echo "Starting Maven build and deploy..." | ||
mvn clean deploy -P release \ | ||
-Dmaven.javadoc.skip=false \ | ||
-Dmaven.deploy.skip=false \ | ||
-Dgpg.keyname=${{ secrets.GPG_KEYNAME }} \ | ||
-Dgpg.useagent=true \ | ||
-Dmaven.test.failure.ignore=false \ | ||
-DnexusUrl=https://s01.oss.sonatype.org/ \ | ||
-DserverId=ossrh \ | ||
-DaltDeploymentRepository=ossrh::default::https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/ \ | ||
-DrepositoryId=ossrh \ | ||
-Dusername=${{ secrets.OSSRH_USERNAME_TOKEN }} \ | ||
-Dpassword=${{ secrets.OSSRH_PASSWORD_TOKEN }} \ | ||
-X \ | ||
-e \ | ||
--debug \ | ||
-Dgpg.verbose=true \ | ||
-Dgpg.debug=true | ||
|
||
echo "Checking deployment status..." | ||
mvn nexus-staging:rc-list \ | ||
-DserverId=ossrh \ | ||
-Dusername=${{ secrets.OSSRH_USERNAME_TOKEN }} \ | ||
-Dpassword=${{ secrets.OSSRH_PASSWORD_TOKEN }} | ||
|
||
echo "Closing staging repository..." | ||
mvn nexus-staging:rc-close \ | ||
-DserverId=ossrh \ | ||
-Dusername=${{ secrets.OSSRH_USERNAME_TOKEN }} \ | ||
-Dpassword=${{ secrets.OSSRH_PASSWORD_TOKEN }} | ||
|
||
echo "Releasing to Maven Central..." | ||
mvn nexus-staging:rc-release \ | ||
-DserverId=ossrh \ | ||
-Dusername=${{ secrets.OSSRH_USERNAME_TOKEN }} \ | ||
-Dpassword=${{ secrets.OSSRH_PASSWORD_TOKEN }} | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.