Skip to content

Update version

Update version #10

Workflow file for this run

name: Publish
on:
push:
branches:
- mehdi.plugin-release-test
permissions:
contents: write
jobs:
release_version:
runs-on: ubuntu-latest
if: github.repository == 'block/kotlin-formatter'
outputs:
version: ${{ steps.release_version.outputs.version }}
steps:
- name: Checkout the repo
uses: actions/checkout@v4
- name: Extract release version
id: release_version
run: |
VERSION=$(grep "^version=" gradle.properties | cut -d'=' -f2 | xargs)
echo "version=$VERSION" >> $GITHUB_OUTPUT
publish:
needs: release_version
env:
ORG_GRADLE_PROJECT_signingInMemoryKey: ${{ secrets.GPG_SECRET_KEY }}
ORG_GRADLE_PROJECT_signingInMemoryKeyPassword: ${{ secrets.GPG_SECRET_PASSPHRASE }}
ORG_GRADLE_PROJECT_mavenCentralUsername: ${{ secrets.SONATYPE_USERNAME_XYZ_BLOCK }}
ORG_GRADLE_PROJECT_mavenCentralPassword: ${{ secrets.SONATYPE_PASSWORD_XYZ_BLOCK }}
runs-on: ubuntu-latest
steps:
# Free disk space to avoid running into "No space left on device" errors
# when downloading multiple versions of IntelliJ for plugin verification
- name: Maximize Build Space
uses: jlumbroso/free-disk-space@v1.3.1
with:
tool-cache: true
- name: Checkout the repo
uses: actions/checkout@v4
- name: Setup java
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Validate Gradle Wrapper
uses: gradle/actions/wrapper-validation@v4
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Publish Idea Plugin
run: |
export IJ_PLUGIN_VERSION="${{ needs.release_version.outputs.version }}"
echo "IJ_PLUGIN_VERSION=$IJ_PLUGIN_VERSION" >> $GITHUB_ENV
./gradlew idea-plugin:publishPlugin
env:
JETBRAINS_TOKEN: ${{ secrets.JETBRAINS_MARKETPLACE_SQUARE_PLUGINS }}