-
Notifications
You must be signed in to change notification settings - Fork 453
47 lines (39 loc) · 1.49 KB
/
deploy-on-release-created.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: deploy-on-release-created
on:
release:
types:
- created
jobs:
deploy-release:
runs-on: ubuntu-latest
steps:
- name: Checkout git repo
uses: actions/checkout@v4
- name: Setup Java
uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'zulu'
cache: 'maven'
server-id: matsim-releases
server-username: MAVEN_USERNAME
server-password: MAVEN_PASSWORD
- name: Set MATSim version
run: mvn versions:set --batch-mode -DnewVersion=${{ github.event.release.tag_name }} -DgenerateBackupPoms=false
# 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 }}
- name: Upload matsim (core) assembly as release asset
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ github.token }}
file: matsim/target/matsim-${{ github.event.release.tag_name }}-release.zip
tag: ${{ github.event.release.tag_name }}
env:
MAVEN_OPTS: -Xmx2g