-
Notifications
You must be signed in to change notification settings - Fork 2
34 lines (32 loc) · 1.03 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: Gradle Plugin CI
on:
push:
jobs:
run:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
- name: Setup Gradle
uses: gradle/gradle-build-action@v2
- name: Compile Plugin and check example
working-directory: example
# building the example also builds the plugin
run: ./gradlew build
- name: Login to Gradle Plugin Portal
if: startsWith(github.ref, 'refs/tags/')
env:
GRADLE_CONFIG: ${{ secrets.GRADLE_CONFIG }}
run: echo "$GRADLE_CONFIG" > ~/.gradle/gradle.properties
- name: Publish Plugin
if: startsWith(github.ref, 'refs/tags/')
env:
MAVEN_USERNAME: ${{ vars.MAVEN_USERNAME }}
MAVEN_PASSWORD: ${{ secrets.MAVEN_PASSWORD }}
run: ./gradlew publish publishPlugins
- name: Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v1