From 0080c252d7ac31b3c2d6b5bb8b8cdf589664c976 Mon Sep 17 00:00:00 2001 From: Camden Narzt Date: Sat, 9 Dec 2023 22:37:58 -0700 Subject: [PATCH] release based on prefixed tag --- .github/workflows/java.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/java.yml b/.github/workflows/java.yml index 12c6a66..105157d 100644 --- a/.github/workflows/java.yml +++ b/.github/workflows/java.yml @@ -3,6 +3,7 @@ name: Java on: push: branches: [ "main" ] + tags: [ 'pre-*' ] pull_request: branches: [ "main" ] @@ -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: @@ -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: @@ -77,3 +95,4 @@ jobs: run: mvn -DuseGithub=true --batch-mode deploy env: GITHUB_TOKEN: ${{ github.token }} + working-directory: getargv.java