Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 9 additions & 43 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -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 }}
deploy:
uses: FontysVenlo/alda_api_workflows/.github/workflows/deploy.yml@main
secrets: inherit
with:
tag: ${{ github.event.release.tag_name }}
18 changes: 1 addition & 17 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
@@ -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
7 changes: 3 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,11 @@
<parent>
<groupId>io.github.fontysvenlo</groupId>
<artifactId>informaticspom</artifactId>
<version>1.2</version>
<version>1.7</version>
<relativePath/>
</parent>
<groupId>io.github.fontysvenlo.alda</groupId>
<artifactId>sorting_api</artifactId>
<version>1.0.0</version>
<artifactId>alda_sorting_api</artifactId>
<version>1.1.0</version>
<packaging>jar</packaging>
<name>Sorting Service API</name>
<properties>
Expand Down