Skip to content

Commit

Permalink
💚 Fix Gradle properties in deployment GitHub workflow
Browse files Browse the repository at this point in the history
Now, secrets are directly specified in the command for publishing the Kotools Samples Gradle plugin, instead of defining them in a dedicated file.
  • Loading branch information
LVMVRQUXL committed Sep 29, 2024
1 parent c5a81ed commit 279ad44
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions .github/workflows/deployment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,23 +19,11 @@ jobs:
uses: gradle/actions/[email protected]
with:
gradle-home-cache-cleanup: true
- name: Configure Gradle home properties
run: |
mkdir $GRADLE_HOME
touch $GRADLE_HOME_PROPERTIES
echo "gradle.publish.key=$GRADLE_PUBLISH_KEY" >> \
$GRADLE_HOME_PROPERTIES
echo "gradle.publish.secret=$GRADLE_PUBLISH_SECRET" >> \
$GRADLE_HOME_PROPERTIES
env:
GRADLE_HOME: ~/.gradle
GRADLE_HOME_PROPERTIES: ${{ env.GRADLE_HOME }}/gradle.properties
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }}
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }}
- name: Publish to Gradle Plugin Portal
run: ./gradlew :jvm:publishPlugins
run: |
./gradlew :jvm:publishPlugins --no-daemon \
-Pgradle.publish.key=${{ secrets.GRADLE_PUBLISH_KEY }} \
-Pgradle.publish.secret=${{ secrets.GRADLE_PUBLISH_SECRET }}
env:
GPG_PASSWORD: ${{ secrets.GPG_PASSWORD }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Clean Gradle properties
run: rm ~/.gradle/gradle.properties

0 comments on commit 279ad44

Please sign in to comment.