mirror of
https://github.com/valitydev/java-service-dependencies.git
synced 2024-11-06 00:05:20 +00:00
Switch to deploy action (#10)
This commit is contained in:
parent
a663810c85
commit
eb7a8cb4b8
35
.github/workflows/deploy.yml
vendored
35
.github/workflows/deploy.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: Build Artifact
|
name: Deploy package
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -7,29 +7,16 @@ on:
|
|||||||
- 'main'
|
- 'main'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
deploy:
|
||||||
runs-on: ubuntu-20.04
|
runs-on: ubuntu-20.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- name: Checkout Repo
|
||||||
- name: Set up Maven Central Repository
|
uses: actions/checkout@v2
|
||||||
uses: actions/setup-java@v2
|
|
||||||
|
- name: Deploy package
|
||||||
|
uses: valitydev/action-deploy-jdk-package@v1.0.12
|
||||||
with:
|
with:
|
||||||
java-version: '15'
|
server-username: ${{ secrets.OSSRH_USERNAME }}
|
||||||
distribution: 'adopt'
|
server-password: ${{ secrets.OSSRH_TOKEN }}
|
||||||
server-id: ossrh
|
deploy-secret-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }}
|
||||||
server-username: MAVEN_USERNAME
|
deploy-secret-key-password: ${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }}
|
||||||
server-password: MAVEN_PASSWORD
|
|
||||||
- name: Install gpg secret key
|
|
||||||
run: |
|
|
||||||
cat <(echo -e "${{ secrets.OSSRH_GPG_SECRET_KEY }}") | gpg --batch --import
|
|
||||||
gpg --list-secret-keys --keyid-format LONG
|
|
||||||
- name: Publish package
|
|
||||||
env:
|
|
||||||
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
|
|
||||||
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
|
|
||||||
run: |
|
|
||||||
mvn \
|
|
||||||
--no-transfer-progress \
|
|
||||||
--batch-mode \
|
|
||||||
-Dgpg.passphrase=${{ secrets.OSSRH_GPG_SECRET_KEY_PASSWORD }} \
|
|
||||||
clean deploy -Pdeploy
|
|
||||||
|
Loading…
Reference in New Issue
Block a user