Merge pull request #201 from slubwama/U4X-993 #200
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | name: Deploy Snapshots | |
| on: | |
| push: | |
| branches: ['master', '1.x'] | |
| repository_dispatch: | |
| types: ['deploy-snapshots'] | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Check out the code | |
| uses: actions/checkout@v3 | |
| - name: Cache Maven dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.m2/repository | |
| key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-maven- | |
| - name: Set up JDK 1.8 and Maven settings file | |
| uses: actions/setup-java@v3 | |
| with: | |
| distribution: 'temurin' | |
| java-version: '8' | |
| server-id: openmrs-repo-snapshots | |
| server-username: MAVEN_USERNAME | |
| server-password: MAVEN_PASSWORD | |
| - name: Deploy to Snapshot Repository | |
| run: mvn -B deploy --file pom.xml | |
| env: | |
| MAVEN_USERNAME: ${{ secrets.BINTRAY_USERNAME }} | |
| MAVEN_PASSWORD: ${{ secrets.BINTRAY_PASSWORD }} |