-
Notifications
You must be signed in to change notification settings - Fork 8
34 lines (34 loc) · 1.06 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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