Skip to content

Commit

Permalink
add deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
nkuehnel committed Jul 24, 2024
1 parent c1f18fa commit 5222f28
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/moia-deploy-on-pr-merge.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
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@v2
- name: Set up JDK 21
uses: actions/setup-java@v1
with:
java-version: 21
- 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.alonso-mora:glpk,org.matsim.alonso-mora:core deploy -am --settings settings.xml -DskipTests=true -DaltSnapshotDeploymentRepository=github::default::https://maven.pkg.github.com/moia-oss/alonso-mora -DaltDeploymentRepository=github::default::https://maven.pkg.github.com/moia-oss/alonso-mora
- 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/matsim-external-development/dispatches --data '{"event_type": "build_application"}'

0 comments on commit 5222f28

Please sign in to comment.