Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Anrufliste committed Jun 1, 2023
1 parent 3607a46 commit e649c55
Showing 1 changed file with 7 additions and 25 deletions.
32 changes: 7 additions & 25 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,37 +15,19 @@ jobs:
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
# Verify gpg secret key
gpg --list-secret-keys --keyid-format LONG
gpg --armor --export-secret-keys ${{ secrets.OSSRH_GPG_SECRET_KEY }} > gpg_key.asc
- uses: actions/checkout@v3
- uses: actions/checkout@v2
- name: Set up Maven Central Repository
uses: actions/setup-java@v3
uses: actions/setup-java@v1
with:
java-version: '11'
distribution: 'adopt'
server-id: ossrh
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
gpg-passphrase: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
- name: build artifact
run: mvn clean package
gpg-private-key: ${{ secrets.MAVEN_GPG_PRIVATE_KEY }}
gpg-passphrase: MAVEN_GPG_PASSPHRASE
- name: Deploy with Maven
run: mvn -B clean deploy -Pci-cd
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }
- name: Create release
uses: ncipollo/release-action@v1
with:
allowUpdates: true
artifacts: "${{ github.workspace }}/target/*.jar"
- name: Publish to the Maven Central Repository
run: |
mvn \
--no-transfer-progress \
--batch-mode \
deploy
env:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}

0 comments on commit e649c55

Please sign in to comment.