diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index a9b82fd..03362d4 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,44 +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@v4 - - name: Set up Maven Central Repository - uses: actions/setup-java@v4 - with: - java-version: '21' - 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: 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 }} \ No newline at end of file diff --git a/.github/workflows/pullrequest.yml b/.github/workflows/pullrequest.yml index c8e86f2..6a941ca 100644 --- a/.github/workflows/pullrequest.yml +++ b/.github/workflows/pullrequest.yml @@ -2,14 +2,8 @@ name: Java CI with Maven on: pull_request: - branches: [ master, main ] - workflow_dispatch: + branches: [ main ] jobs: - test: - uses: FontysVenlo/alda-workflows/.github/workflows/maven.yml@main - permissions: - checks: write - contents: read - pull-requests: write - secrets: inherit \ No newline at end of file + build: + uses: FontysVenlo/alda_api_workflows/.github/workflows/pullrequest.yml@main \ No newline at end of file diff --git a/README.md b/README.md index d25a5aa..aa6588c 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,13 @@ -# alda_simpletime_api -API for ALDA Assignment SimpleTime +# ALDA Simple Time API + +This repository houses the API source code of of the simple time exercise. + +The JavaDoc can be found at [https://fontysvenlo.github.io/alda_simpletime_api/latest](https://fontysvenlo.github.io/alda_simpletime_api/latest). + +## Instructions + +The main instructions for the exercise can be found in your **own** repository. + +## Issues + +If you encounter any problems with the exercise, please create an issue on this repository so we can fix it for the next year :raised_hands: diff --git a/pom.xml b/pom.xml index 61b2bdf..5ddbbfb 100644 --- a/pom.xml +++ b/pom.xml @@ -6,11 +6,11 @@ io.github.fontysvenlo informaticspom - 1.0 + 1.7 - io.github.fontysvenlo.alda - simpletime_api - 2.5 + io.github.fontysvenlo + alda_simpletime_api + 1.0.0 jar ALDA Simple Time API ALDA Simple Time API