-
Notifications
You must be signed in to change notification settings - Fork 4
36 lines (30 loc) · 1.03 KB
/
saas_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
name: Publish Gradle Portal
on:
release:
types: [ published ]
jobs:
publish:
if: ${{ startsWith(github.event.release.name, 'Saas') }}
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: 11
# Gradle 缓存配置
- name: Cache Gradle packages
uses: actions/cache@v2
with:
path: ~/.gradle/caches
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle') }}
restore-keys: ${{ runner.os }}-gradle
# 给 gradlew 文件授权
# 构建项目
- name: Build with Gradle
run: |
chmod +x gradlew
./gradlew :autotracker-gradle-plugin:clean
- name: Publish plugin to gradlePortal
run: ./gradlew :autotracker-gradle-plugin:saas-gradle-plugin:publishPlugins -Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}