add some example modules, instructions, basic setup etc #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This workflow will build a package using Maven and then publish it to GitHub packages when a release is created | |
# For more information see: https://github.com/actions/setup-java/blob/main/docs/advanced-usage.md#apache-maven-with-a-settings-path | |
name: Maven Package | |
on: | |
release: | |
types: [created] | |
push: | |
branches: | |
- '*' | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
packages: write | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v4 #https://github.com/actions/setup-java | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
server-id: github # Value of the distributionManagement/repository/id field of the pom.xml # ID of the distributionManagement repository in the pom.xml file. Default is github. | |
# server-username: GITHUB_ACTOR # Environment variable name for the username for authentication to the Apache Maven repository. Default is GITHUB_ACTOR. | |
# server-password: GITHUB_TOKEN # Environment variable name for password or token for authentication to the Apache Maven repository. Default is GITHUB_TOKEN. | |
#settings-path: ${{ github.workspace }} # location for the settings.xml file # Maven related setting to point to the directory where the settings.xml file will be written. Default is ~/.m2. | |
- name: Show file content v3 | |
run: cat ~/.m2/settings.xml | |
continue-on-error: true | |
# - name: Show file content v4 | |
# run: cat .github/settings.xml | |
# continue-on-error: true | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
- name: Show file content v3 | |
run: cat ~/.m2/settings.xml | |
continue-on-error: true | |
# - name: Show file content v4 | |
# run: cat .github/settings.xml | |
# continue-on-error: true | |
# - name: Publish to GitHub Packages Apache Maven | |
# #run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml | |
# run: ./mvnw deploy | |
# env: | |
# GITHUB_TOKEN: ${{ github.token }} | |
# GITHUB_ACTOR: ${{ secrets.DEPLOY_GITHUB_USERNAME }} | |
- name: Publish to GitHub Packages Apache Maven | |
#run: mvn deploy -s $GITHUB_WORKSPACE/settings.xml | |
run: ./mvnw deploy | |
env: | |
GITHUB_TOKEN: ${{ secrets.DEPLOY_GITHUB_TOKEN }} | |
GITHUB_ACTOR: ${{ secrets.DEPLOY_GITHUB_USERNAME }} |