restructured the project #49
Workflow file for this run
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
name: Java Maven Build & Publish Artifact | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
EIC_TENANT: ${{ secrets.EIC_TENANT }} | |
EIC_USERNAME: ${{ secrets.EIC_USERNAME }} | |
EIC_PASSWORD: ${{ secrets.EIC_PASSWORD }} | |
jobs: | |
build_env: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up JDK 8 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
cache: maven | |
- name: Build with Maven | |
run: mvn -B package --file pom.xml | |
publish_jar: | |
runs-on: ubuntu-latest | |
needs: build_env | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-java@v3 | |
with: | |
java-version: '8' | |
distribution: 'temurin' | |
- run: mvn --batch-mode --update-snapshots verify | |
- run: mkdir staging && cp target/*.jar staging | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: eic-sdk-java.jar | |
path: staging | |
publish_javadoc: | |
runs-on: ubuntu-latest | |
needs: publish_jar | |
permissions: | |
contents: write # if you have a protection rule on your repository, you'll need to give write permission to the workflow. | |
steps: | |
- name: Deploy JavaDoc 🚀 | |
uses: MathieuSoysal/[email protected] | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
javadoc-branch: javadoc | |
java-version: '8' | |
target-folder: javadoc # url will be https://<username>.github.io/<repo>/javadoc, This can be left as nothing to generate javadocs in the root folder. | |
project: maven # or gradle | |
# # subdirectories: moduleA moduleB #for subdirectories support, needs to be run with custom command |