-
Notifications
You must be signed in to change notification settings - Fork 21
44 lines (36 loc) · 1.48 KB
/
deploy-snapshots.yml
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
34
35
36
37
38
39
40
41
42
43
44
# For every commit pushed to the master branch, or any change detected to dependencies in Maven,
# this will compile, package, test, verify, and deploy the master branch.
# This is only configured to deploy to the SNAPSHOTS repository, so is not intended to be used for releases
name: Deploy Snapshots
on:
push:
branches: ['master', '1.x']
repository_dispatch:
types: ['deploy-snapshots']
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Check out the code
- uses: actions/checkout@v2
# Enable caching of Maven dependencies to speed up job execution. See https://github.com/actions/cache
- uses: actions/cache@v1
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
restore-keys: |
${{ runner.os }}-maven-
# Set up Java 1.8 with Maven including a .m2/settings.xml file. See https://github.com/actions/setup-java
- name: Set up JDK 1.8 and Maven settings file
uses: actions/setup-java@v1
with:
java-version: 1.8
server-id: openmrs-repo-modules-pih-snapshots
server-username: BINTRAY_USERNAME
server-password: BINTRAY_PASSWORD
# Execute the Maven deploy command to compile, package, test, verify, and publish to SNAPSHOT repository
- name: Maven Deploy
run: mvn -B deploy --file pom.xml
env:
BINTRAY_USERNAME: pih
BINTRAY_PASSWORD: ${{ secrets.BINTRAY_PASSWORD }}