-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (38 loc) · 1.05 KB
/
snapshot.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
36
37
38
39
40
41
name: Build and deploy a snapshot
on:
push:
branches:
- master
- 'snapshot/*'
- 'kotlin-*'
paths-ignore:
- '**.md'
- '**.adoc'
- '**/.gitignore'
- './github/**'
- '!./github/workflow/snapshot.yml'
env:
SONATYPE_USERNAME: ${{ secrets.sonatype_username }}
SONATYPE_PASSWORD: ${{ secrets.sonatype_password }}
jobs:
build-upload:
runs-on: ubuntu-latest
steps:
- name: Check out
uses: actions/checkout@v2
- name: Cached Gradle
uses: actions/cache@v2
with:
path: ~/.gradle
key: gradle-${{ hashFiles('**/*.gradle*') }}-${{ hashFiles('**/gradle/wrapper/gradle-wrapper.properties') }}
restore-keys: gradle-
- name: Set up JDK 11
uses: actions/setup-java@v1
with:
java-version: 11
- name: Check
run: ./gradlew build check
shell: bash
- name: Upload
run: ./gradlew publishAllPublicationsToOssrhStagingRepository -PgitRef=${{ github.ref }} -Psnapshot=true
shell: bash