V4.2.0-SNAPSHOT #27
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 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 }} |