Skip to content

Commit

Permalink
Deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
mk868 committed Nov 6, 2024
1 parent 6fb959f commit 2e25318
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 1 deletion.
50 changes: 50 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Deploy with Maven

on:
workflow_run:
workflows: [ "Java CI with Maven" ]
types: [completed]
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'

jobs:
deploy:
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- uses: actions/checkout@v4

- name: Set up JDK 23
uses: actions/setup-java@v4
with:
java-version: '23'
distribution: 'temurin'
cache: maven

- uses: s4u/[email protected]
with:
servers: |
[{
"id": "central",
"username": "${{ secrets.CENTRAL_USERNAME }}",
"password": "${{ secrets.CENTRAL_TOKEN }}"
}]
- name: Cache jextract
id: cache-jextract
uses: actions/cache@v4
with:
path: jextract
key: 22-jextract+5-33

- name: Set up jextract
if: steps.cache-jextract.outputs.cache-hit != 'true'
run: ./prepare-jextract.sh

- name: Deploy with Maven
env:
MAVEN_GPG_PASSPHRASE: ${{ secrets.MAVEN_GPG_PASSPHRASE }}
MAVEN_GPG_KEY: ${{ secrets.MAVEN_GPG_KEY }}
run: |
./prepare.sh
mvn -B -ntp -f jgpio/pom.xml -P release deploy -DskipTests -Dgpg.signer=bc -Djextract.bin=../jextract/bin/jextract
4 changes: 3 additions & 1 deletion .github/workflows/maven.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ name: Java CI with Maven

on:
push:
branches: [ "main" ]
branches: [ "*" ]
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
pull_request:
branches: [ "main" ]

Expand Down

0 comments on commit 2e25318

Please sign in to comment.