diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 3d21dd2..03362d4 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -1,46 +1,12 @@
name: Publish package to the Maven Central Repository
+
on:
- push:
- branches:
- - 'releases/**'
- tags:
- - 'v*'
+ release:
+ types: [created]
+
jobs:
- publish:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - name: Set up Maven Central Repository
- uses: actions/setup-java@v3
- with:
- java-version: '17'
- distribution: 'adopt'
- server-id: ossrh
- server-username: MAVEN_USERNAME
- server-password: MAVEN_PASSWORD
- gpg-private-key: ${{ secrets.OSSRH_GPG_SECRET_KEY }} # Value of the GPG private key to import
- gpg-passphrase: MAVEN_GPG_PASSPHRASE # env variable for GPG private key passphrase
- - name: Get POM version
- run: echo "POM_VERSION=$(mvn help:evaluate -Dexpression=project.version -q -DforceStdout)" >> $GITHUB_ENV
- - name: Get tag version
- run: echo "TAG_VERSION=${GITHUB_REF#refs/*/}" >> $GITHUB_ENV
- - name: Make sure that the versions match
- run: '[[ "v$POM_VERSION" == "$TAG_VERSION" ]] && exit 0 || exit 1'
- - name: Install
- run: mvn install
- - name: Generate JavaDoc
- run: mvn javadoc:javadoc
- - name: Publish package to maven central
- run: mvn --batch-mode deploy -P release
- env:
- MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
- MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}
- MAVEN_GPG_PASSPHRASE: ${{ secrets.OSSRH_GPG_PASSPHRASE }}
- MAVEN_OPTS: "--add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.desktop/java.awt.font=ALL-UNNAMED"
- - name: Deploy JavaDoc to GitHub Pages
- uses: JamesIves/github-pages-deploy-action@v4
- with:
- clean: false
- folder: target/site/apidocs
- branch: javadoc
- target-folder: ${{ env.TAG_VERSION }}
\ No newline at end of file
+ deploy:
+ uses: FontysVenlo/alda_api_workflows/.github/workflows/deploy.yml@main
+ secrets: inherit
+ with:
+ tag: ${{ github.event.release.tag_name }}
\ No newline at end of file
diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml
index 59d2f13..6a941ca 100644
--- a/.github/workflows/pullrequest.yml
+++ b/.github/workflows/pullrequest.yml
@@ -1,25 +1,9 @@
name: Java CI with Maven
on:
- push:
- branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v3
- - name: Set up JDK
- uses: actions/setup-java@v3
- with:
- java-version: '17'
- distribution: 'temurin'
- cache: maven
- - name: Make sure that the API can compile
- run: mvn compile
- - name: Download latest alda checkstyle
- run: curl https://raw.githubusercontent.com/FontysVenlo/alda_checkstyle/main/alda_checks.xml -o alda_checks.xml
- - name: Check JavaDoc
- run: mvn checkstyle:check -Dcheckstyle.config.location=alda_checks.xml
+ uses: FontysVenlo/alda_api_workflows/.github/workflows/pullrequest.yml@main
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index 6d6dc25..6ad352d 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,12 +6,11 @@
io.github.fontysvenlo
informaticspom
- 1.2
+ 1.7
- io.github.fontysvenlo.alda
- sorting_api
- 1.0.0
+ alda_sorting_api
+ 1.1.0
jar
Sorting Service API