-
Notifications
You must be signed in to change notification settings - Fork 0
Update workflows #2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| 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 | ||
| secrets: inherit | ||
| with: | ||
| tag: ${{ github.event.release.tag_name }} | ||
| 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: |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -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> | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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?
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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> | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice