Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 13 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,30 +24,31 @@ jobs:
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.x'
cache: true
cache-dependency-path: src/dotnet/*/*.csproj

- name: Setup Gradle
uses: gradle/actions/setup-gradle@0b6dd653ba04f4f93bf581ec31e66cbd7dcb644d # v4

- name: Cache NuGet packages
- name: Cache IntelliJ Platform
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('src/dotnet/*/*.csproj', 'src/dotnet/*.props') }}
restore-keys: |
${{ runner.os }}-nuget-
path: ~/.intellijPlatform
key: intellij-${{ hashFiles('gradle.properties') }}

- name: Build Plugin
run: ./gradlew buildPlugin --build-cache
if: github.ref != 'refs/heads/master'
run: ./gradlew buildPlugin --parallel --build-cache

- name: Build & Publish Plugin
if: github.ref == 'refs/heads/master'
run: ./gradlew publishPlugin -PBuildConfiguration="Release" -PPublishToken="$PUBLISH_KEY" --parallel --build-cache
env:
PUBLISH_KEY: ${{ secrets.PublishKey }}

- name: Publish Artifact
uses: actions/upload-artifact@v4
with:
name: Artifacts
path: output
retention-days: 7

- name: Publish plugins to jetbrains
run: ./gradlew publishPlugin -PBuildConfiguration="Release" -PPublishToken="$PUBLISH_KEY" --build-cache
env:
PUBLISH_KEY: ${{ secrets.PublishKey }}
if: github.event_name != 'pull_request' && github.ref == 'refs/heads/master'
Loading