Skip to content

Merge pull request #70 from mbeddr/feature/mps-2023.3 #1

Merge pull request #70 from mbeddr/feature/mps-2023.3

Merge pull request #70 from mbeddr/feature/mps-2023.3 #1

Workflow file for this run

name: MPS-QA_CI
on:
push:
branches:
- master
- 'maintenance/*'
pull_request:
workflow_dispatch:
inputs:
publish:
description: Whether to publish the build result to Maven repositories
type: boolean
default: false
required: false
env:
GITHUB_TOKEN: ${{ secrets.MPSQA_GITHUB_PKG_REGISTRY }}
jobs:
build_mps_qa_packages:
runs-on: ubuntu-latest
env:
DISPLAY: ':99'
steps:
- uses: actions/checkout@v2
- name: Setup headless environment
run: |
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build MPS-QA and migrate
uses: gradle/gradle-build-action@v2
with:
arguments: >
build migrate rerunMigrations
-Partifacts.itemis.cloud.user=${{secrets.ARTIFACTS_ITEMIS_CLOUD_USER}}
-Partifacts.itemis.cloud.pw=${{secrets.ARTIFACTS_ITEMIS_CLOUD_PW}}
wrapper-cache-enabled: true
dependencies-cache-enabled: true
dependencies-cache-key: gradle/dependency-locks/**
dependencies-cache-exact: true
configuration-cache-enabled: true
- name: Check for no dirty files after build and migration
run: |
if [[ -n $(git status --porcelain | head --lines=1) ]]
then
echo "Dirty files detected after build/migration, run './gradlew migrate' and/or update .gitignore to fix:"
git status
exit 1
fi
- name: Publish
uses: gradle/gradle-build-action@v2
# Only publish on push (to maintenance or master) or when explicitly requested
if: ${{ github.event_name == 'push' || (github.event_name == 'workflow_dispatch' && inputs.publish == 'true') }}
with:
arguments: >
publish -x build_allInOne_package
-Partifacts.itemis.cloud.user=${{secrets.ARTIFACTS_ITEMIS_CLOUD_USER}}
-Partifacts.itemis.cloud.pw=${{secrets.ARTIFACTS_ITEMIS_CLOUD_PW}}
wrapper-cache-enabled: true
dependencies-cache-enabled: true
dependencies-cache-key: gradle/dependency-locks/**
dependencies-cache-exact: true
configuration-cache-enabled: true
- name: Archive distribution
uses: actions/upload-artifact@v2
with:
name: org.mpsqa.allInOne
path: build/artifacts/org.mpsqa.allInOne/