Skip to content

Commit

Permalink
Enable GitHub Actions CI
Browse files Browse the repository at this point in the history
  • Loading branch information
HeikoKlare committed Dec 19, 2020
1 parent 61ecb9a commit f1edfdd
Showing 1 changed file with 66 additions and 0 deletions.
66 changes: 66 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
name: CI

on:
push:
branches: [master]
create:
tags:
pull_request:
schedule:
- cron: '30 2 * * *' # run nightly at 2:30 am

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Cache
uses: actions/cache@v2
with:
path: ~/.m2
key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml', '**/MANIFEST.MF') }}
restore-keys: ${{ runner.os }}-m2
- name: Set up JDK
uses: actions/setup-java@v1
with:
java-version: 11
- name: Build and Verify
uses: GabrielBB/xvfb-action@v1
with:
run: >
./mvnw -B clean verify
-Dstyle.color=always
-Dorg.slf4j.simpleLogger.log.org.apache.maven.cli.transfer.Slf4jMavenTransferListener=warn
-Dorg.slf4j.simpleLogger.log.org.eclipse.tycho.core.resolver.DefaultTychoResolver=warn
-Dorg.slf4j.simpleLogger.log.org.eclipse.tycho.osgi.configuration.MavenContextConfigurator=warn
-Dorg.slf4j.simpleLogger.log.org.eclipse.sisu.equinox.launching.internal.DefaultEquinoxLauncher=warn
-Dorg.slf4j.simpleLogger.log.org.eclipse.xtext.maven.XtextGenerateMojo=warn
env:
MAVEN_OPTS: -Djansi.force=true
- name: Publish Nightly Update Site
if: github.ref == 'refs/heads/master' && github.repository_owner == 'kit-sdq'
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.UPDATE_SITE_DEPLOY_KEY }}
external_repository: kit-sdq/updatesite
destination_dir: nightly/metamodels/demo
publish_dir: releng/edu.kit.ipd.sdq.metamodels.demo.updatesite/target/repository
publish_branch: master
- name: Determine Release Version
if: startsWith(github.ref, 'refs/tags/releases/') && github.repository_owner == 'kit-sdq'
id: releaseVersion
uses: little-core-labs/[email protected]
with:
tagRegex: "releases/(.*)"
- name: Publish Release Update Site
if: startsWith(github.ref, 'refs/tags/releases/') && github.repository_owner == 'kit-sdq'
uses: peaceiris/actions-gh-pages@v3
with:
deploy_key: ${{ secrets.UPDATE_SITE_DEPLOY_KEY }}
external_repository: kit-sdq/updatesite
destination_dir: release/metamodels/demo/${{ steps.releaseVersion.outputs.tag }}
publish_dir: releng/edu.kit.ipd.sdq.metamodels.demo.updatesite/target/repository
publish_branch: master


0 comments on commit f1edfdd

Please sign in to comment.