aboutsummaryrefslogtreecommitdiffstats
path: root/.github/workflows/jvm.yml
diff options
context:
space:
mode:
authorMatt Strapp <matt@mattstrapp.net>2024-10-29 13:28:20 -0500
committerMatt Strapp <matt@mattstrapp.net>2024-10-29 13:34:59 -0500
commita9ba312ad4d5ea3264fd9586f49d2714a128ffbb (patch)
tree6385de074f1e3d27764eb62182c2039e04355f9e /.github/workflows/jvm.yml
parentci: use correct changeset and fix typo (diff)
downloadlocusts-a9ba312ad4d5ea3264fd9586f49d2714a128ffbb.tar
locusts-a9ba312ad4d5ea3264fd9586f49d2714a128ffbb.tar.gz
locusts-a9ba312ad4d5ea3264fd9586f49d2714a128ffbb.tar.bz2
locusts-a9ba312ad4d5ea3264fd9586f49d2714a128ffbb.tar.lz
locusts-a9ba312ad4d5ea3264fd9586f49d2714a128ffbb.tar.xz
locusts-a9ba312ad4d5ea3264fd9586f49d2714a128ffbb.tar.zst
locusts-a9ba312ad4d5ea3264fd9586f49d2714a128ffbb.zip
jvm: Fix versioning?
Signed-off-by: Matt Strapp <matt@mattstrapp.net>
Diffstat (limited to '.github/workflows/jvm.yml')
-rw-r--r--.github/workflows/jvm.yml38
1 files changed, 35 insertions, 3 deletions
diff --git a/.github/workflows/jvm.yml b/.github/workflows/jvm.yml
index dd52115..62ba3dd 100644
--- a/.github/workflows/jvm.yml
+++ b/.github/workflows/jvm.yml
@@ -39,8 +39,8 @@ jobs:
- name: Build with Gradle
run: ./gradlew build
- publish-preview:
- name: Publish Preview to GitHub Packages
+ publish-snapshot:
+ name: Publish Snapshot to GitHub Packages
needs: build-and-test
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
runs-on: ubuntu-latest
@@ -61,5 +61,37 @@ jobs:
java-version: '11'
- name: Build with Gradle
run: ./gradlew build
+ - name: Publish the preview package
+ run: ./gradlew publishAllPublicationsToGitHubPackagesRepository
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
+
+
+ publish-release:
+ name: Publish Packages to Maven Central and GitHub Packages
+ needs: build-and-test
+ if: ${{ github.ref_type == 'tag' && startsWith(github.ref, 'refs/tags/') }}
+ runs-on: ubuntu-latest
+ permissions:
+ packages: write
+ contents: write
+ steps:
+ - name: Checkout
+ uses: actions/checkout@v4
+ with:
+ fetch-depth: 0
+ lfs: true
+ - name: Setup Java
+ uses: actions/setup-java@v4
+ with:
+ cache: 'gradle'
+ distribution: 'adopt'
+ java-version: '11'
+ - name: Build with Gradle
+ run: ./gradlew build
- name: Publish the package
- run: ./gradlew publish \ No newline at end of file
+ run: ./gradlew publish
+ env:
+ MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
+ MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file