fix: Correct ant build target for Github Actions #164
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
on: | |
push: | |
branches: | |
- master | |
- development | |
jobs: | |
# TODO: Reuse pr.yml test runner setup | |
# tests: | |
# name: Tests | |
# if: "!contains(github.event.head_commit.message, '__SEMANTIC RELEASE VERSION UPDATE__')" | |
# runs-on: ubuntu-latest | |
# strategy: | |
# fail-fast: true | |
# env: | |
# MODULE_ID: cbelasticsearch | |
# steps: | |
# - name: Checkout Repository | |
# uses: actions/checkout@v2 | |
# - name: Setup Java JDK | |
# uses: actions/[email protected] | |
# with: | |
# java-version: 11 | |
# - name: Set Up CommandBox | |
# uses: elpete/[email protected] | |
# - name: Install dependencies | |
# run: | | |
# box install | |
# box install ${{ matrix.coldbox }} --noSave | |
# - name: Start server | |
# run: box server start cfengine=${{ matrix.cfengine }} --noSaveSettings | |
# - name: Run TestBox Tests | |
# run: box testbox run | |
release: | |
name: Release | |
# if: "!contains(github.event.head_commit.message, '__SEMANTIC RELEASE VERSION UPDATE__')" | |
# needs: tests | |
runs-on: ubuntu-latest | |
env: | |
GA_COMMIT_MESSAGE: ${{ github.event.head_commit.message }} | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- name: Setup Java JDK | |
uses: actions/[email protected] | |
with: | |
java-version: 11 | |
- name: Set Up CommandBox | |
uses: elpete/[email protected] | |
- name: Setup Release Properties | |
run: | | |
box install | |
mv build.xml workbench/build.xml | |
printf "\ncfengine=${{ matrix.cfengine}}" >> .module.properties | |
- name: Run Ant Release | |
run: | | |
docker run -v ${PWD}:/app -w /app repos.silowebworks.com:5443/pub/docker-base:commandbox-ant-builder /bin/sh -c "ant build -f /app/workbench/build.xml -Dbuild.branch=${{ env.GITHUB_REF }} -Dproject.buildNumber=${{ env.GITHUB_RUN_NUMBER }}" | |
# - name: Install and Configure CommandBox modules | |
# run: | | |
# box install commandbox-docbox | |
# - name: Generate API Docs | |
# run: box run-script build:apidocs | |
# - name: Upload API Docs to S3 | |
# uses: jakejarvis/s3-sync-action@master | |
# with: | |
# args: --acl public-read | |
# env: | |
# AWS_S3_BUCKET: "apidocs.ortussolutions.com" | |
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} | |
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }} | |
# SOURCE_DIR: ".tmp/apidocs" | |
# DEST_DIR: "" | |
# - name: Upload Build Artifacts | |
# if: success() | |
# uses: actions/upload-artifact@v2 | |
# with: | |
# name: contentbox-variants | |
# path: | | |
# artifacts/**/* | |
# - name: Upload Binaries to S3 | |
# uses: jakejarvis/s3-sync-action@master | |
# with: | |
# args: --acl public-read | |
# env: | |
# AWS_S3_BUCKET: "downloads.ortussolutions.com" | |
# AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY }} | |
# AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_ACCESS_SECRET }} | |
# SOURCE_DIR: "artifacts" | |
# DEST_DIR: "ortussolutions" | |
# - name: Get Current Version | |
# id: current_version | |
# run: echo "::set-output name=version::`cat $TRAVIS_BUILD_DIR/box.json | jq '.version' -r`" |