forked from matsim-org/matsim-libs
-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (29 loc) · 1.49 KB
/
moia-deploy-on-pr-merge.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
name: deploy-on-pr-merge
on:
push: # snapshot deployment
branches:
- moia-deployment
jobs:
deploy-snapshot:
name: deploy MOIA
# for PR-labelled deployment -- only if closed by merging
if: github.event_name == 'push' || github.event.pull_request.merged == true
runs-on: ubuntu-latest
environment: prd
steps:
- uses: actions/checkout@v3
- name: Set up JDK 21
uses: actions/setup-java@v3
with:
java-version: 21
distribution: 'zulu'
- name: Set version
run: mvn versions:set -DnewVersion=moia-latest-SNAPSHOT
- name: Deploy with Maven
env:
USERNAME: ${{github.actor}}
PASSWORD: ${{ secrets.GITHUB_TOKEN }}
run: mvn -pl org.matsim.contrib:sbb-extensions,org.matsim.contrib:drt,org.matsim.contrib:drt-extensions,org.matsim.contrib:discrete_mode_choice,org.matsim.contrib:simulatedannealing deploy -am --settings settings.xml -DskipTests=true -DaltSnapshotDeploymentRepository=github::default::https://maven.pkg.github.com/moia-oss/matsim-libs -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/moia-oss/matsim-libs
- name: Trigger external development build
run: |
curl -XPOST -u "${{ secrets.PAT_USERNAME}}:${{secrets.PAT_TOKEN}}" -H "Accept: application/vnd.github.everest-preview+json" -H "Content-Type: application/json" https://api.github.com/repos/moia-dev/transport-modeling/dispatches --data '{"event_type": "build_application"}'