Skip to content

Commit

Permalink
tweaks for maven publish CI
Browse files Browse the repository at this point in the history
  • Loading branch information
ThePrez committed Aug 17, 2024
1 parent 08aa09e commit 0466746
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 13 deletions.
13 changes: 11 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,10 @@ on:
release:
types: [created]

env:
CONFIG_PROPERTIES: ./src/test/resources/config.properties
CONFIG_PROPERTIES_SAMPLE: ./src/test/resources/config.properties.sample

jobs:
release:

Expand Down Expand Up @@ -39,7 +43,7 @@ jobs:
java-version: '8'
distribution: 'temurin'
cache: maven
server-id: ossrh
server-id: central
server-username: OSSRH_USERNAME
server-password: OSSRH_TOKEN
gpg-passphrase: GPG_PASSPHRASE
Expand All @@ -56,8 +60,13 @@ jobs:
sed -i 's/^IBMI_PASSWORD=/IBMI_PASSWORD=${{ secrets.IBMI_PASSWORD }}/' ${{ env.CONFIG_PROPERTIES }}
sed -i 's/^IBMI_PORT=/IBMI_PORT=${{ secrets.IBMI_PORT }}/' ${{ env.CONFIG_PROPERTIES }}
- name: remove test dir
run: rm -fr src/test
- name: check settings.xml
run: cat $HOME/.m2/settings.xml

- name: Publish Maven Package
run: mvn -B clean deploy --file pom.xml
run: mvn --batch-mode -Dgpg.passphrase=${{ secrets.GPG_PASSPHRASE }} clean deploy --file pom.xml

- name: List Target Directory
run: ls -l target
Expand Down
21 changes: 10 additions & 11 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -261,17 +261,16 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.7.0</version>
<extensions>true</extensions>
<configuration>
<serverId>ossrh</serverId>
<nexusUrl>https://s01.oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>true</autoReleaseAfterClose>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.central</groupId>
<artifactId>central-publishing-maven-plugin</artifactId>
<version>0.5.0</version>
<extensions>true</extensions>
<configuration>
<publishingServerId>central</publishingServerId>
<autoPublish>true</autoPublish>
</configuration>
</plugin>
</plugins>
</build>

Expand Down

0 comments on commit 0466746

Please sign in to comment.