Skip to content

v0.4.0.12

v0.4.0.12 #19

name: Publish to JetBrains Marketplace
on:
release:
types: [ published ]
workflow_dispatch:
inputs:
release_tag:
description: 'Use release notes of'
type: string
required: true
jobs:
publish:
name: Publish release
runs-on: ubuntu-latest
steps:
# Setup environment
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin
# Setup cache
- name: Setup cache for Gradle and dependencies
uses: actions/cache@v4
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: "gradle-\
${{runner.os}}-\
${{hashFiles('gradle/wrapper/gradle-wrapper.properties')}}-\
${{hashFiles('gradle.properties', '**/*.gradle.kts')}}"
# Build and publish
- name: Obtain release notes
uses: actions/github-script@v7
with:
script: |
await require('.github/scripts/get-release-notes.js')({
github, context, core,
outputFile: 'release_note.md',
releaseTagInput: 'release_tag',
allowFallbackToLatest: true,
});
- name: Patch changelog for release
run: ./gradlew --stacktrace patchChangelog --release-note="$(<release_note.md)"
- name: Build and publish plugin
id: gradle-build
env:
JETBRAINS_TOKEN: ${{ secrets.JETBRAINS_TOKEN }}
run: ./gradlew --stacktrace publishPlugin
# Upload artifacts
- name: Upload build reports
if: steps.gradle-build.outcome == 'success' || steps.gradle-build.outcome == 'failure'
uses: actions/upload-artifact@v4
with:
name: build-reports
path: build/reports/
if-no-files-found: ignore