Skip to content

Commit 11c8cfb

Browse files
committed
add moia deployment files
1 parent f77a68e commit 11c8cfb

File tree

3 files changed

+76
-0
lines changed

3 files changed

+76
-0
lines changed

.github/CODEOWNERS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# https://help.github.com/articles/about-codeowners/
2+
#
3+
# These owners will be the default owners for everything in
4+
# the repo. Unless a later match takes precedence,
5+
# mentioned account names will be requested for
6+
# review when someone opens a pull request.
7+
* @mfrawley-moia @nkuehnel @fzwick @TomE168
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: deploy-on-pr-merge
2+
3+
on:
4+
push: # snapshot deployment
5+
branches:
6+
- moia-deployment
7+
8+
jobs:
9+
deploy-snapshot:
10+
name: deploy MOIA
11+
# for PR-labelled deployment -- only if closed by merging
12+
if: github.event_name == 'push' || github.event.pull_request.merged == true
13+
14+
runs-on: ubuntu-latest
15+
16+
environment: prd
17+
steps:
18+
- uses: actions/checkout@v3
19+
- name: Set up JDK 17
20+
uses: actions/setup-java@v3
21+
with:
22+
java-version: 17
23+
distribution: 'zulu'
24+
- name: Set version
25+
run: mvn versions:set -DnewVersion=moia-latest-SNAPSHOT
26+
- name: Deploy with Maven
27+
env:
28+
USERNAME: ${{github.actor}}
29+
PASSWORD: ${{ secrets.GITHUB_TOKEN }}
30+
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
31+
- name: Trigger external development build
32+
run: |
33+
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/matsim-external-development/dispatches --data '{"event_type": "build_application"}'

settings.xml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
2+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3+
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
4+
http://maven.apache.org/xsd/settings-1.0.0.xsd">
5+
6+
<activeProfiles>
7+
<activeProfile>github</activeProfile>
8+
</activeProfiles>
9+
10+
<profiles>
11+
<profile>
12+
<id>github</id>
13+
<repositories>
14+
<repository>
15+
<id>central</id>
16+
<url>https://repo1.maven.org/maven2</url>
17+
</repository>
18+
<repository>
19+
<id>github</id>
20+
<url>https://maven.pkg.github.com/moia-oss/matsim-libs</url>
21+
<snapshots>
22+
<enabled>true</enabled>
23+
</snapshots>
24+
</repository>
25+
</repositories>
26+
</profile>
27+
</profiles>
28+
29+
<servers>
30+
<server>
31+
<id>github</id>
32+
<username>${env.USERNAME}</username>
33+
<password>${env.PASSWORD}</password>
34+
</server>
35+
</servers>
36+
</settings>

0 commit comments

Comments
 (0)