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
50 changes: 9 additions & 41 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -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

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice

secrets: inherit
with:
tag: ${{ github.event.release.tag_name }}
12 changes: 3 additions & 9 deletions .github/workflows/pullrequest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
build:
uses: FontysVenlo/alda_api_workflows/.github/workflows/pullrequest.yml@main
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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:
8 changes: 4 additions & 4 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
<parent>
<groupId>io.github.fontysvenlo</groupId>
<artifactId>informaticspom</artifactId>
<version>1.0</version>
<version>1.7</version>
</parent>
<groupId>io.github.fontysvenlo.alda</groupId>
<artifactId>simpletime_api</artifactId>
<version>2.5</version>
<groupId>io.github.fontysvenlo</groupId>
<artifactId>alda_simpletime_api</artifactId>
<version>1.0.0</version>

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough, works due to the rename, but confusing maybe?

should we 'unpublish'the https://mvnrepository.com/artifact/io.github.fontysvenlo.alda/simpletime_api artefacts?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, but I think we can start with a nice version now with the new naming scheme. Especially as before we didn't follow semantic versioning.

Deleting is certainly an option, lets discuss with @RvandenHam as well

<packaging>jar</packaging>
<name>ALDA Simple Time API</name>
<description>ALDA Simple Time API</description>
Expand Down