Skip to content

Commit

Permalink
- git compliance
Browse files Browse the repository at this point in the history
  • Loading branch information
Reef3rm4n committed Jun 29, 2023
1 parent 0f281bf commit b117e78
Showing 1 changed file with 20 additions and 25 deletions.
45 changes: 20 additions & 25 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,29 @@
name: Publish package to the Maven Central Repository and GitHub Packages
name: Maven Publish
on:
push:
branches:
- main
jobs:
build:
publish:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
java-version: 17

- name: Build with Maven
run: mvn -B package --file pom.xml

- name: Set up Apache Maven Central
uses: actions/setup-java@v1
with: # running setup-java again overwrites the settings.xml
java-version: 1.8
server-id: maven # Value of the distributionManagement/repository/id field of the pom.xml
server-username: reeferman # env variable for username in deploy
server-password: MAVEN_PASSWORD # env variable for token in deploy
gpg-private-key: $ # Value of the GPG private key to import
gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase

- name: Publish to Apache Maven Central
run: mvn deploy
java-version: '17'
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg-passphrase: GPG_PASSPHRASE
- name: Publish Packages
run: mvn --batch-mode clean deploy
env:
MAVEN_USERNAME: reeferman
MAVEN_CENTRAL_TOKEN: $
MAVEN_GPG_PASSPHRASE: $
MAVEN_USERNAME: ${ secrets. OSSRH_USERNAME }}
MAVEN_PASSWORD: ${ secrets. OSSRH_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets. GPG_PASSPHRASE }}

0 comments on commit b117e78

Please sign in to comment.