-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (34 loc) · 1.08 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
35
name: CI
on:
push:
branches:
- master
tags:
- v*
pull_request:
schedule:
- cron: '0 0 * * 1'
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-java@v1
with:
java-version: 11
- name: Tests
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=vierbergenlars_ci-detect-gradle-plugin -Dsonar.organization=vierbergenlars-github -Dsonar.host.url=https://sonarcloud.io
- name: Publish plugin
if: ${{ startsWith(github.ref, 'refs/tags/') }}
env:
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
run: ./gradlew publishPlugins -Pgradle.publish.key=$GRADLE_PUBLISH_KEY -Pgradle.publish.secret=$GRADLE_PUBLISH_SECRET