From 2a46ba6b6f8b005d40b67219e5ab2ddb9e56ba56 Mon Sep 17 00:00:00 2001 From: jo-elimu <1451036+jo-elimu@users.noreply.github.com> Date: Wed, 1 Nov 2023 13:00:18 +0700 Subject: [PATCH] chore: Setup Maven releases closes #276 --- .../workflows/{maven.yml => maven-build.yml} | 7 +++-- .github/workflows/maven-publish.yml | 30 ------------------- README.md | 2 +- pom.xml | 8 ++--- 4 files changed, 10 insertions(+), 37 deletions(-) rename .github/workflows/{maven.yml => maven-build.yml} (69%) delete mode 100644 .github/workflows/maven-publish.yml diff --git a/.github/workflows/maven.yml b/.github/workflows/maven-build.yml similarity index 69% rename from .github/workflows/maven.yml rename to .github/workflows/maven-build.yml index 5f0f0f6..03acda4 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven-build.yml @@ -10,7 +10,7 @@ jobs: build: strategy: matrix: - os: [ubuntu-latest, windows-latest] + os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v3 @@ -19,4 +19,7 @@ jobs: distribution: 'temurin' java-version: 8 cache: maven - - run: mvn -B package --file pom.xml + - run: mvn clean + - run: mvn compile + - run: mvn test + - run: mvn package diff --git a/.github/workflows/maven-publish.yml b/.github/workflows/maven-publish.yml deleted file mode 100644 index ea76291..0000000 --- a/.github/workflows/maven-publish.yml +++ /dev/null @@ -1,30 +0,0 @@ -# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created -# For more information see: https://github.com/actions/setup-java#apache-maven-with-a-settings-path - -name: Maven Package & Publish - -on: - release: - types: [created] - -jobs: - build: - - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v3 - - name: Set up JDK 1.8 - uses: actions/setup-java@v3 - with: - java-version: 1.8 - server-id: github # Value of the distributionManagement/repository/id field of the pom.xml - settings-path: ${{ github.workspace }} # location for the settings.xml file - - - name: Build with Maven - run: mvn -B package --file pom.xml - - - name: Publish to GitHub Packages Apache Maven - run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml - env: - GITHUB_TOKEN: ${{ github.token }} diff --git a/README.md b/README.md index ec01b97..d5bfaf4 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ mvn compile ## Release 📦 -See [.github/workflows/maven-publish.yml](.github/workflows/maven-publish.yml) +See [.github/workflows/maven-release.yml](.github/workflows/maven-release.yml) --- diff --git a/pom.xml b/pom.xml index 9c85dc8..bdb4e57 100644 --- a/pom.xml +++ b/pom.xml @@ -16,12 +16,12 @@ - GitHub - https://github.com/elimu-ai/model/projects + GitHub Projects + https://github.com/orgs/elimu-ai/projects?query=is%3Aopen - Travis CI - https://travis-ci.org/elimu-ai/model + GitHub Actions + https://github.com/elimu-ai/model/actions scm:git:https://github.com/elimu-ai/model.git