From dcbd07f5adbb22bf93ed6258cdc607a01887c7f9 Mon Sep 17 00:00:00 2001 From: Michael7371 <40476797+Michael7371@users.noreply.github.com> Date: Mon, 15 Jul 2024 14:52:41 -0600 Subject: [PATCH] adding github actions --- .github/workflows/artifact-publish.yml | 31 ++++++++++++++++++++++++++ pom.xml | 10 ++++++++- 2 files changed, 40 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/artifact-publish.yml diff --git a/.github/workflows/artifact-publish.yml b/.github/workflows/artifact-publish.yml new file mode 100644 index 000000000..cb4b8e259 --- /dev/null +++ b/.github/workflows/artifact-publish.yml @@ -0,0 +1,31 @@ +name: Publish Java Package + +on: + push: + tags: + - 'jpo-ode-*' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v4 + + - name: Set up JDK 21 + uses: actions/setup-java@v4 + with: + java-version: '21' + distribution: 'adopt' + + - name: Remove snapshot from version + run: mvn versions:set -DremoveSnapshot + + - name: Build with Maven + run: mvn -B package --file pom.xml + + - name: Publish to GitHub Packages + run: mvn --batch-mode -Dgithub_organization=${{ github.repository_owner }} deploy + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/pom.xml b/pom.xml index 9399cbd82..dd3b72661 100644 --- a/pom.xml +++ b/pom.xml @@ -49,6 +49,8 @@ ${project.basedir}/target/site/jacoco/jacoco.xml java 1.49 + + usdot-jpo-ode @@ -161,5 +163,11 @@ - + + + github + GitHub Packages + https://maven.pkg.github.com/CDOT-CV/jpo-ode + +