Make latest Fares v2 updates #15
This file contains 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: Github Packages Build | |
# On [push, pull_request] causes double-builds when creating PRs. | |
# But triggering on push only will miss pull requests from outside authors. | |
# The push event's ref is the name of the pushed branch; | |
# The pull_request event's branch name is the merge target branch. | |
# TODO: Remove otp2-upgrade from here once we've merged to master and deployed to prod | |
on: | |
push: | |
branches: | |
- master | |
- otp2-upgrade | |
pull_request: | |
branches: | |
- master | |
- otp2-upgrade | |
jobs: | |
build-linux: | |
runs-on: ubuntu-latest | |
timeout-minutes: 20 | |
steps: | |
# Starting in v2.2 checkout action fetches all tags when fetch-depth=0, for auto-versioning. | |
- uses: actions/checkout@v3.3.0 | |
with: | |
fetch-depth: 0 | |
# Java setup step completes very fast, no need to run in a preconfigured docker container | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: 17 | |
distribution: temurin | |
cache: maven | |
- name: Prepare coverage agent, build and test | |
run: mvn --batch-mode package -Dmaven.test.skip | |
- name: Deploy to Github Package Registry | |
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/otp2-upgrade') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: mvn --batch-mode deploy --settings maven-settings.xml -DskipTests -DGITHUB_REPOSITORY=$GITHUB_REPOSITORY -P deployGitHub |