Skip to content

CI

CI #265

Workflow file for this run

name: CI
on:
push:
branches:
- master
tags:
- v*
pull_request:
schedule:
- cron: '0 0 * * 1'
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-java@v1
with:
java-version: 17
- name: Check
run: ./gradlew check
- name: Upload analysis to sonarcloud
if: "${{ env.SONAR_TOKEN != '' }}"
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_TOKEN: ${{ github.token }}
run: ./gradlew sonarqube -Dsonar.projectKey=xenit-eu_alfresco-gradle-sdk -Dsonar.organization=xenit-eu -Dsonar.host.url=https://sonarcloud.io
- name: Publish
if: ${{ startsWith(github.ref, 'refs/tags/') }}
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PLUGINS_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PLUGINS_PUBLISH_SECRET }}
run: ./gradlew publishPlugins -Pgradle.publish.key=$GRADLE_PUBLISH_KEY -Pgradle.publish.secret=$GRADLE_PUBLISH_SECRET