Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions .github/workflows/ci-cd.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# Build and potentially deploy code on PRs merging into the develop or master branch
name: CI/CD

on:
pull_request:
branches: [ master, develop ]
types: [assigned, opened, synchronize, reopened, closed ] # Run when there are updates to the code in the PR or when the PR is closed and merged

jobs:
build: # Only build when not merging
if: ${{ !github.event.pull_request.merged }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Build with Ant
uses: GabrielBB/xvfb-action@v1
with:
working-directory: ./build/ant
run: |
ant -noinput -buildfile build.xml

deploy:
# Build and deploy when merging
# Needs to be in a full job because file workspace isn't shared between jobs, so cannot easily refactor
if: ${{ github.event.pull_request.merged }}
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
java-version: '11'
distribution: 'adopt'
- name: Build with Ant
uses: GabrielBB/xvfb-action@v1
with:
working-directory: ./build/ant
run: |
ant -noinput -buildfile build.xml
- name: Deploy files
shell: bash
run: |
/usr/bin/chmod +x ./build/publish-artifacts.sh
/usr/bin/bash ./build/publish-artifacts.sh
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28 changes: 0 additions & 28 deletions .github/workflows/commit.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/dev_merge.yml

This file was deleted.

35 changes: 0 additions & 35 deletions .github/workflows/master_merge.yml

This file was deleted.

3 changes: 2 additions & 1 deletion build/maven/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,8 @@
<target name="maven.build" unless="isWindows">
<exec dir="." executable="mvn" failifexecutionfails="true" failonerror="true">
<arg value="clean" />
<arg value="deploy" />
<!-- TODO: Consider putting the next into a separate target and use something like compile instead to avoid packaging everything on every commit to a PR. -->
<arg value="deploy" />
<arg value="--quiet" />
</exec>
</target>
Expand Down