-
Notifications
You must be signed in to change notification settings - Fork 7.6k
56 lines (51 loc) · 2.02 KB
/
gradle_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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
# This workflow will build a Java project with Gradle
# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-gradle
name: Snapshot
on:
push:
branches: [ '3.x' ]
permissions:
contents: read
jobs:
build:
runs-on: ubuntu-latest
if: github.repository == 'ReactiveX/RxJava'
permissions:
contents: write
env:
# ------------------------------------------------------------------------------
CI_BUILD_NUMBER: ${{ github.run_number }}
steps:
- uses: actions/checkout@v3
- name: Set up JDK 8
uses: actions/setup-java@v3
with:
distribution: 'zulu'
java-version: '8'
- name: Cache Gradle packages
uses: actions/cache@v3.3.1
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ secrets.CACHE_VERSION }}-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle-${{ secrets.CACHE_VERSION }}
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Grant execute permission for push
run: chmod +x push_javadoc.sh
- name: Build RxJava
run: ./gradlew build --stacktrace --no-daemon
- name: Upload Snapshot
run: ./gradlew -PreleaseMode=branch publish --no-daemon --no-parallel --stacktrace
env:
# Define secrets at https://github.com/ReactiveX/RxJava/settings/secrets/actions
# ------------------------------------------------------------------------------
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USER }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
- name: Upload to Codecov
uses: codecov/codecov-action@v3
- name: Push Javadoc
run: ./push_javadoc.sh
# Define secrets at https://github.com/ReactiveX/RxJava/settings/secrets/actions
# ------------------------------------------------------------------------------
env:
JAVADOCS_TOKEN: ${{ secrets.JAVADOCS_TOKEN }}