Skip to content

Commit

Permalink
get ready for github actions to make the releases
Browse files Browse the repository at this point in the history
cannot have git tag trigger it, because a tag is created by the release process, so i’m not sure of a better way to trigger this than every successful run
  • Loading branch information
CamJN committed Sep 24, 2023
1 parent 38f6116 commit 228bc43
Show file tree
Hide file tree
Showing 3 changed files with 41 additions and 54 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,3 +46,34 @@ jobs:
- name: Test with Maven
run: mvn -B test --file pom.xml
working-directory: getargv.java

- name: Set up JDK
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
check-latest: true
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-passphrase: MAVEN_GPG_PASSPHRASE
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
- name: Publish package to Maven Central
run: mvn --batch-mode deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
java-version: '17'
distribution: 'temurin'
cache: maven
check-latest: true
server-id: github
- name: Publish package to GitHub Packages
run: mvn -DuseGithub=true --batch-mode deploy
env:
GITHUB_TOKEN: ${{ github.token }}
53 changes: 0 additions & 53 deletions .github/workflows/publish.yml

This file was deleted.

11 changes: 10 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@
<name>!useGithub</name>
</property>
</activation>
<properties>
<pinentry-mode>ask</pinentry-mode>
</properties>
<distributionManagement>
<snapshotRepository>
<id>ossrh</id>
Expand All @@ -76,9 +79,11 @@
<activation>
<property>
<name>useGithub</name>
<value>true</value>
</property>
</activation>
<properties>
<pinentry-mode>loopback</pinentry-mode>
</properties>
<distributionManagement>
<repository>
<id>github</id>
Expand Down Expand Up @@ -204,6 +209,10 @@
</executions>
<configuration>
<keyname>${gpg_keyname}</keyname>
<gpgArguments>
<arg>--pinentry-mode</arg>
<arg>${pinentry-mode}</arg>
</gpgArguments>
</configuration>
</plugin>
<plugin>
Expand Down

0 comments on commit 228bc43

Please sign in to comment.