chore(workflow): add workflow step for publishing artifacts to Maven Central

This commit is contained in:
Akash Yadav
2023-04-13 00:01:29 +05:30
parent 67fb6d36e8
commit 770525c07d
+29
View File
@@ -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