-
Notifications
You must be signed in to change notification settings - Fork 22
65 lines (53 loc) · 1.84 KB
/
publish.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
57
58
59
60
61
62
63
64
65
name: CI
on:
push:
branches:
- main
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Gradle Wrapper Validation
uses: gradle/actions/wrapper-validation@v4
- name: Install JDK 11
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Test Plugin
run: ./gradlew -p focus-gradle-plugin clean check --no-daemon --stacktrace
- name: (Fail-only) Bundle test reports
if: failure()
run: find . -type d -name 'reports' | zip -@ -r build-reports.zip
- name: (Fail-only) Upload the build report
if: failure()
uses: actions/upload-artifact@v4
with:
name: error-report
path: build-reports.zip
publish:
runs-on: ubuntu-latest
if: github.repository == 'dropbox/focus' && github.ref == 'refs/heads/main' && github.event_name != 'pull_request'
needs: [build]
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install JDK 11
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 11
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Publish release
run: ./gradlew -p focus-gradle-plugin clean publish --no-daemon --no-parallel --no-configuration-cache --stacktrace
env:
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD }}
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.SIGNING_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.SIGNING_PASSWORD }}