Publish to the Gradle Plugin Portal #19
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
# A workflow for publishing the plugin to the Gradle Plugin Portal | |
# | |
# Release Process: | |
# 1. Update the version number in root build.gradle to the next non-SNAPSHOT version. | |
# e.g. replace `version '1.2.3-SNAPSHOT' with '1.2.3' | |
# 2. Replace all references to the last release number with the new release number. | |
# e.g. search for `1.2.2` and replace with `1.2.3`. | |
# 3. Commit changes in PR and merge. | |
# 4. Run this workflow to publish the plugin. | |
# 5. Update the version number in root build.gradle to the next -SNAPSHOT version. | |
## e.g. replace `version '1.2.3' with '1.2.4-SNAPSHOT' | |
name: Publish to the Gradle Plugin Portal | |
on: [workflow_dispatch] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
env: | |
GRADLE_PUBLISH_KEY: ${{ secrets.GRADLE_PUBLISH_KEY }} | |
GRADLE_PUBLISH_SECRET: ${{ secrets.GRADLE_PUBLISH_SECRET }} | |
steps: | |
- name: Git checkout | |
uses: actions/checkout@v4 | |
- name: Set up JDK 11 | |
uses: actions/setup-java@v4 | |
with: | |
cache: gradle | |
distribution: microsoft | |
java-version: 11 | |
- name: Create gradle.properties | |
run: echo -e "gradle.publish.key=$GRADLE_PUBLISH_KEY\ngradle.publish.secret=$GRADLE_PUBLISH_SECRET" > gradle.properties | |
- name: Build with Gradle | |
run: ./gradlew build -x test publishPlugins |