Skip to content
Merged
Show file tree
Hide file tree
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
48 changes: 48 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: CI

on:
push:
branches: [ main ]
pull_request:

concurrency:
group: ci-${{ github.ref_name }}
cancel-in-progress: true

jobs:
check:
name: Check the plugin for ${{ matrix.environmentName }}
runs-on: arc-runners-large
timeout-minutes: 60
strategy:
matrix:
environmentName:
- 252
- 253
- 261
fail-fast: false
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 1

- name: Setup Corretto JDK
uses: actions/setup-java@v4
with:
java-version-file: '.java-version'
distribution: 'corretto'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Resolve plugin version
run: |
BASE_VERSION=$(grep '^pluginVersion=' gradle.properties | cut -d'=' -f2)
echo "VERSION=${BASE_VERSION}.${{ github.run_number }}" >> $GITHUB_ENV

- name: Run tests
run: ./gradlew test -PenvironmentName=${{ matrix.environmentName }} -PpluginVersion=${{ env.VERSION }}

- name: Verify plugin
run: ./gradlew verifyPlugin -PenvironmentName=${{ matrix.environmentName }} -PpluginVersion=${{ env.VERSION }}
24 changes: 11 additions & 13 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -1,21 +1,25 @@
name: Plugin deployment
name: Publish

on:
push:
workflow_run:
workflows: [ CI ]
types: [ completed ]
branches: [ main ]
pull_request:
release:
types: [ published ]

concurrency:
group: publish-plugin-${{ github.ref_name }}
group: publish-${{ github.ref_name }}
cancel-in-progress: true

jobs:
deploy:
name: Deploy the plugin for ${{ matrix.environmentName }}
publish:
name: Publish the plugin for ${{ matrix.environmentName }}
runs-on: arc-runners-large
timeout-minutes: 60
if: >
(github.event_name == 'release') ||
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
strategy:
matrix:
environmentName:
Expand Down Expand Up @@ -53,14 +57,8 @@ jobs:
path: intellij-plugin/build/distributions
retention-days: 3

- name: Run tests
run: ./gradlew test -PenvironmentName=${{ matrix.environmentName }} -PpluginVersion=${{ env.VERSION }}

- name: Verify plugin
run: ./gradlew verifyPlugin -PenvironmentName=${{ matrix.environmentName }} -PpluginVersion=${{ env.VERSION }}

- name: Publish plugin to Marketplace (dev channel)
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
if: github.event_name == 'workflow_run'
run: ./gradlew publishPlugin -PenvironmentName=${{ matrix.environmentName }} -PpluginVersion=${{ env.VERSION }}
env:
JB_MARKETPLACE_TOKEN: ${{ secrets.JB_MARKETPLACE_TOKEN }}
Expand Down
Loading