Skip to content

Saas-V2.10.3-SNAPSHOT #31

Saas-V2.10.3-SNAPSHOT

Saas-V2.10.3-SNAPSHOT #31

Workflow file for this run

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@v4
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
# Gradle 缓存配置
- name: Cache Gradle packages
uses: actions/cache@v4
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 clean
./gradlew build
- name: Publish plugin to gradlePortal
run: ./gradlew :autotracker-gradle-plugin:publishPlugins -Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} -Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}