Release #42
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: | |
types: [released] | |
jobs: | |
build: | |
name: Build | |
uses: ./.github/workflows/build.yml | |
secrets: inherit | |
with: | |
version: ${{ github.event.release.tag_name }} | |
# Publish new version to the JetBrains marketplace | |
release: | |
name: Release and Publish | |
needs: build | |
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 | |
- name: Convert Markdown to HTML | |
id: convert-markdown | |
shell: bash | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y pandoc | |
MARKDOWN="${{ github.event.release.body }}" | |
HTML=$(echo "$MARKDOWN" | pandoc -f markdown -t html) | |
{ | |
echo "html_output<<EOF" | |
echo "${HTML}" | |
echo EOF | |
} >> $GITHUB_OUTPUT | |
echo "${HTML}" >> $GITHUB_STEP_SUMMARY | |
# echo "html_output=$HTML" >> $GITHUB_OUTPUT | |
# Publish the plugin to JetBrains Marketplace | |
- name: Publish Plugin | |
env: | |
PLUGIN_VERSION: ${{ github.event.release.tag_name }} | |
CHANGELOG: ${{ github.step.convert-markdown.outputs.html_output }} | |
PUBLISH_TOKEN: ${{ secrets.PLUGIN_REPOSITORY_TOKEN }} | |
run: ./gradlew publishPlugin | |
# 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/* |