-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add maven central repo support
- Loading branch information
Showing
45 changed files
with
248 additions
and
153 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -1,27 +1,43 @@ | ||
name: Publish package to the Maven Central Repository | ||
name: Deploy to Maven Central | ||
|
||
on: | ||
release: | ||
types: [ created ] | ||
workflow_dispatch: | ||
inputs: | ||
version: | ||
description: 'Version to publish' | ||
required: true | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Maven Central Repository | ||
uses: actions/setup-java@v4 | ||
- name: Step 1 - Checkout code | ||
uses: actions/checkout@v3 | ||
with: | ||
ref: ${{ github.ref_name }} # Dynamically use branch name | ||
|
||
- name: Step 2 - Import GPG Key | ||
run: | | ||
echo "${{ secrets.GPG_PUBLIC_KEY }}" | gpg --import | ||
echo "${{ secrets.GPG_SECRET_KEY }}" | gpg --import --no-tty --batch --yes | ||
env: | ||
GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }} | ||
GPG_SECRET_KEY: ${{ secrets.GPG_SECRET_KEY }} | ||
|
||
- name: Step 3 - Set up Maven Central Repository | ||
uses: actions/setup-java@v3 | ||
with: | ||
java-version: '8' | ||
distribution: 'temurin' | ||
server-id: central | ||
server-username: MAVEN_USERNAME | ||
server-password: MAVEN_PASSWORD | ||
gpg-private-key: ${{ secrets.GPG_SIGNING_KEY }} | ||
gpg-private-key: ${{ secrets.GPG_SECRET_KEY }} | ||
gpg-passphrase: MAVEN_GPG_PASSPHRASE | ||
- name: Set version | ||
run: mvn versions:set -DnewVersion=${{ github.event.release.tag_name }} | ||
- name: Publish package | ||
run: mvn -P release --batch-mode deploy -DskipTests | ||
|
||
- name: Step 3 - Publish Package to Maven Central | ||
env: | ||
MAVEN_USERNAME: ${{ secrets.CENTRAL_TOKEN_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.CENTRAL_TOKEN_PASSWORD }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_SIGNING_KEY_PASSWORD }} | ||
MAVEN_USERNAME: ${{ secrets.MAVEN_USERNAME }} | ||
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }} | ||
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} | ||
run: mvn clean deploy -P release -DskipTests --batch-modeSetting Up Github Secrets |
This file contains 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 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,24 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd" | ||
xmlns="http://maven.apache.org/SETTINGS/1.0.0"> | ||
<servers> | ||
<server> | ||
<id>central</id> | ||
<username>${env.MAVEN_USERNAME}</username> | ||
<password>${env.MAVEN_PASSWORD}</password> | ||
</server> | ||
</servers> | ||
<profiles> | ||
<profile> | ||
<id>central</id> | ||
<activation> | ||
<activeByDefault>true</activeByDefault> | ||
</activation> | ||
<properties> | ||
<gpg.executable>gpg</gpg.executable> | ||
<gpg.passphrase>${env.MAVEN_GPG_PASSPHRASE}</gpg.passphrase> | ||
</properties> | ||
</profile> | ||
</profiles> | ||
</settings> |
8 changes: 4 additions & 4 deletions
8
...ava/com/r4tylmz/betterpoi/BPExporter.java → .../github/r4tylmz/betterpoi/BPExporter.java
This file contains 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
4 changes: 2 additions & 2 deletions
4
...va/com/r4tylmz/betterpoi/BPFormatter.java → ...github/r4tylmz/betterpoi/BPFormatter.java
This file contains 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
16 changes: 8 additions & 8 deletions
16
...ava/com/r4tylmz/betterpoi/BPImporter.java → .../github/r4tylmz/betterpoi/BPImporter.java
This file contains 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
8 changes: 4 additions & 4 deletions
8
.../r4tylmz/betterpoi/BPMetadataHandler.java → .../r4tylmz/betterpoi/BPMetadataHandler.java
This file contains 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
12 changes: 6 additions & 6 deletions
12
...va/com/r4tylmz/betterpoi/BPValidator.java → ...github/r4tylmz/betterpoi/BPValidator.java
This file contains 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
6 changes: 3 additions & 3 deletions
6
...4tylmz/betterpoi/annotation/BPColumn.java → ...4tylmz/betterpoi/annotation/BPColumn.java
This file contains 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
2 changes: 1 addition & 1 deletion
2
...betterpoi/annotation/BPExcelWorkbook.java → ...betterpoi/annotation/BPExcelWorkbook.java
This file contains 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
8 changes: 4 additions & 4 deletions
8
...r4tylmz/betterpoi/annotation/BPSheet.java → ...r4tylmz/betterpoi/annotation/BPSheet.java
This file contains 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
2 changes: 1 addition & 1 deletion
2
...ylmz/betterpoi/annotation/BPWorkbook.java → ...ylmz/betterpoi/annotation/BPWorkbook.java
This file contains 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
4 changes: 2 additions & 2 deletions
4
...z/betterpoi/constraint/ColConstraint.java → ...z/betterpoi/constraint/ColConstraint.java
This file contains 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
2 changes: 1 addition & 1 deletion
2
...ylmz/betterpoi/constraint/Constraint.java → ...ylmz/betterpoi/constraint/Constraint.java
This file contains 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
4 changes: 2 additions & 2 deletions
4
...tterpoi/constraint/ConstraintFactory.java → ...tterpoi/constraint/ConstraintFactory.java
This file contains 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
8 changes: 4 additions & 4 deletions
8
...tterpoi/constraint/DefaultConstraint.java → ...tterpoi/constraint/DefaultConstraint.java
This file contains 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
4 changes: 2 additions & 2 deletions
4
...z/betterpoi/constraint/RowConstraint.java → ...z/betterpoi/constraint/RowConstraint.java
This file contains 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
2 changes: 1 addition & 1 deletion
2
...om/r4tylmz/betterpoi/enums/ExcelType.java → ...ub/r4tylmz/betterpoi/enums/ExcelType.java
This file contains 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
2 changes: 1 addition & 1 deletion
2
...com/r4tylmz/betterpoi/utils/CellUtil.java → ...hub/r4tylmz/betterpoi/utils/CellUtil.java
This file contains 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.