Fix publishing pipeline (hopefully) (#2311)

Summary:
https://github.com/facebook/flipper/runs/2574198766?check_suite_focus=true
shows that the env vars aren't getting picked up. There's some sort
of transformation syntax (https://docs.gradle.org/current/userguide/build_environment.html#sec:project_properties)
which I thought this would follow but didn't.

I'm merging this now with the already existing gradle.properties update
we do. I also tested locally that this approach works.

Pull Request resolved: https://github.com/facebook/flipper/pull/2311

Test Plan:
Updated my local gradle.properties accordingly and re-uploaded the 0.90
release.

Reviewed By: nikoant

Differential Revision: D28440724

Pulled By: passy

fbshipit-source-id: 9f7238b61fe309eea087b5d6a063788e9ea76e85
This commit is contained in:
Pascal Hartig
2021-05-14 06:56:07 -07:00
committed by Facebook GitHub Bot
parent b797fec6cc
commit ab93c24dd6

View File

@@ -27,7 +27,7 @@ jobs:
- name: Write GPG Sec Ring
run: echo '${{ secrets.GPG_KEY_CONTENTS }}' | base64 -d > /tmp/secring.gpg
- name: Update gradle.properties
run: echo -e "signing.secretKeyRingFile=/tmp/secring.gpg\nsigning.keyId=${{ secrets.SIGNING_KEY_ID }}\nsigning.password=${{ secrets.SIGNING_PASSWORD }}" >> gradle.properties
run: echo -e "signing.secretKeyRingFile=/tmp/secring.gpg\nsigning.keyId=${{ secrets.SIGNING_KEY_ID }}\nsigning.password=${{ secrets.SIGNING_PASSWORD }}\nmavenCentralPassword=${{ secrets.SONATYPE_NEXUS_PASSWORD }}\nmavenCentralUsername=${{ secrets.SONATYPE_NEXUS_USERNAME }}" >> gradle.properties
- name: Compute build cache
run: ./scripts/checksum-android.sh checksum-android.txt
- uses: actions/cache@v2
@@ -41,14 +41,8 @@ jobs:
run: ./gradlew :sample:assembleDebug :sample:assembleRelease && ./gradlew :android:assembleRelease
- name: Upload Archives
run: ./gradlew uploadArchives --no-parallel --no-daemon
env:
mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
- name: Release and close
run: ./gradlew closeAndReleaseRepository
env:
mavenCentralPassword: ${{ secrets.SONATYPE_NEXUS_PASSWORD }}
mavenCentralUsername: ${{ secrets.SONATYPE_NEXUS_USERNAME }}
- name: Clean secrets
if: always()
run: rm /tmp/secring.gpg