24.4 #10
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: Maven Deploy | |
on: | |
release: | |
types: [created] | |
jobs: | |
deploy-release: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout git repo | |
uses: actions/checkout@v2 | |
- name: Cache local Maven repository | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Setup Java | |
uses: actions/setup-java@v2 | |
with: | |
java-version: 17 | |
distribution: 'adopt' | |
server-id: pt2matsim-releases | |
server-username: MAVEN_USERNAME | |
server-password: MAVEN_PASSWORD | |
# Build and publish are separated so we start deploying only after all jars are built successfully | |
- name: Build jars | |
run: mvn package --batch-mode -DskipTests | |
- name: Publish jars to matsim maven repo | |
# fail at end to deploy as many jars as possible | |
run: mvn deploy -P release --batch-mode --fail-at-end -DskipTests -Dmaven.resources.skip=true -Dmaven.install.skip=true | |
env: | |
MAVEN_USERNAME: ${{ secrets.REPOMATSIM_USERNAME }} | |
MAVEN_PASSWORD: ${{ secrets.REPOMATSIM_TOKEN }} | |
env: | |
MAVEN_OPTS: -Xmx2g |