Skip to content

Commit

Permalink
release based on prefixed tag
Browse files Browse the repository at this point in the history
  • Loading branch information
CamJN committed Dec 10, 2023
1 parent 228bc43 commit 0080c25
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/java.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ name: Java
on:
push:
branches: [ "main" ]
tags: [ 'pre-*' ]
pull_request:
branches: [ "main" ]

Expand Down Expand Up @@ -47,6 +48,22 @@ jobs:
run: mvn -B test --file pom.xml
working-directory: getargv.java

release:
needs: [ build ]
runs-on: macos-latest
if: ${{ github.ref_type == 'tag' }}
steps:
- uses: actions/checkout@v3
with:
repository: getargv/getargv
path: getargv
token: ${{ secrets.GH_PAT }}
- name: Build libgetargv
run: make install_dylib
working-directory: getargv
- uses: actions/checkout@v3
with:
path: getargv.java
- name: Set up JDK
uses: actions/setup-java@v3
with:
Expand All @@ -65,6 +82,7 @@ jobs:
MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
working-directory: getargv.java
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v3
with:
Expand All @@ -77,3 +95,4 @@ jobs:
run: mvn -DuseGithub=true --batch-mode deploy
env:
GITHUB_TOKEN: ${{ github.token }}
working-directory: getargv.java

0 comments on commit 0080c25

Please sign in to comment.