also allow subway re-entry once entering different transit mode #129
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: OTP CI 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. | |
on: | |
push: | |
branches: | |
- master | |
- dev-1.x | |
- dev-2.x | |
pull_request: | |
branches: | |
- master | |
- dev-1.x | |
- dev-2.x | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# Starting in v2.2 checkout action fetches all tags when fetch-depth=0, for auto-versioning. | |
- uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
# Java setup step completes very fast, no need to run in a preconfigured docker container | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v1 | |
with: | |
java-version: 11 | |
- name: Cache local Maven repository | |
uses: actions/cache@v2 | |
with: | |
path: ~/.m2/repository | |
key: ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }} | |
restore-keys: | | |
${{ runner.os }}-maven- | |
- name: Build and Test | |
run: mvn --batch-mode --update-snapshots verify | |
- name: Deploy to Github Package Registry | |
if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/dev-1.x' || github.ref == 'refs/heads/dev-2.x') | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: mvn --batch-mode deploy --settings maven-settings.xml -DskipTests -DGITHUB_REPOSITORY=$GITHUB_REPOSITORY |