Skip to content

Instantly share code, notes, and snippets.

@alexandramartinez
Created May 1, 2024 20:52
Show Gist options
  • Save alexandramartinez/87668502d7320b7e995945fb112e7adb to your computer and use it in GitHub Desktop.
Save alexandramartinez/87668502d7320b7e995945fb112e7adb to your computer and use it in GitHub Desktop.
name: Publish to Exchange & Deploy to CH2.0
on:
push:
branches: [ main ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout this repo
uses: actions/checkout@v4
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: ${{ runner.os }}-maven-
- name: Set up JDK 1.8
uses: actions/setup-java@v4
with:
distribution: "zulu"
java-version: 8
- name: Publish to Exchange
run: |
mvn deploy --settings .maven/settings.xml -DskipMunitTests \
-Dclient.id="${{ secrets.CONNECTED_APP_CLIENT_ID }}" \
-Dclient.secret="${{ secrets.CONNECTED_APP_CLIENT_SECRET }}"
- name: Deploy to CloudHub 2.0
run: |
mvn deploy --settings .maven/settings.xml -DskipMunitTests -DmuleDeploy \
-Dclient.id="${{ secrets.CONNECTED_APP_CLIENT_ID }}" \
-Dclient.secret="${{ secrets.CONNECTED_APP_CLIENT_SECRET }}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment