mirror of
https://gitee.com/zhangsken/AndroidIDE.git
synced 2026-10-16 07:49:44 +08:00
chore(workflow): add workflow step for publishing artifacts to Maven Central
This commit is contained in:
@@ -203,3 +203,32 @@ jobs:
|
||||
with:
|
||||
name: .nyx-state-${{ github.job }}.json
|
||||
path: build/nyx-state.json
|
||||
|
||||
publish_artifacts:
|
||||
name: Publish artifacts
|
||||
runs-on: ubuntu-latest
|
||||
needs: [ build_apk, unit_test_debug, test_tooling_api ]
|
||||
if: ${{ always() && github.event_name != 'pull_request' && needs.build_apk.result == 'success' && needs.unit_test_debug.result == 'success' && needs.test_tooling_api.result == 'success' }}
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v3
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Set up JDK 17
|
||||
uses: actions/setup-java@v3
|
||||
with:
|
||||
java-version: '17'
|
||||
distribution: 'temurin'
|
||||
- name: Change Gradle wrapper permissions
|
||||
run: chmod +x ./gradlew
|
||||
- name: Restore cache
|
||||
uses: actions/cache@v3
|
||||
with:
|
||||
path: |
|
||||
~/.gradle/caches
|
||||
~/.gradle/wrapper
|
||||
key: ${{ runner.os }}-gradle-${{ hashFiles('**/*.gradle*') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-gradle-
|
||||
- name: Publish release
|
||||
run: ./gradlew publishAllPublicationsToMavenCentralRepository --stacktrace
|
||||
Reference in New Issue
Block a user