Release #27
Workflow file for this run
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
# Releases the plugin to GitHub and JetBrains | |
name: Release | |
on: [release] | |
jobs: | |
build: | |
name: Build Plugin | |
uses: ./.github/workflows/build.yml | |
secrets: inherit | |
# Create new draft release on GitHub and upload zipped artifact | |
release: | |
name: Release Plugin on Github | |
needs: build | |
environment: prod | |
runs-on: ubuntu-latest | |
steps: | |
# Upload artifact as a release asset | |
- name: Upload Release Asset | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: gh release upload ${{ github.event.release.tag_name }} ./build/distributions/* | |
# Publish new version to the JetBrains marketplace | |
jb-publish: | |
name: Publish Plugin to JetBrains | |
needs: release | |
environment: prod | |
runs-on: ubuntu-latest | |
steps: | |
# Check out current repository | |
- name: Fetch Sources | |
uses: actions/checkout@v4 | |
# Setup Java 17 environment for the next steps | |
- name: Setup Java | |
uses: actions/setup-java@v4 | |
with: | |
distribution: zulu | |
java-version: 17 | |
# Setup Gradle | |
- name: Setup Gradle | |
uses: gradle/actions/setup-gradle@v3 | |
with: | |
gradle-home-cache-cleanup: true | |
# Publish the plugin to JetBrains Marketplace | |
- name: Publish Plugin | |
env: | |
PUBLISH_TOKEN: ${{ secrets.PLUGIN_REPOSITORY_TOKEN }} | |
run: ./gradlew publishPlugin |