Skip to content

Commit

Permalink
publish eap on pre-release, publish stable on release (#211)
Browse files Browse the repository at this point in the history
* publish eap on pre-release, publish stable on release

* rename workflows
  • Loading branch information
mkurnikov authored Oct 20, 2024
1 parent 7b807eb commit 6ca4b86
Show file tree
Hide file tree
Showing 2 changed files with 100 additions and 22 deletions.
46 changes: 24 additions & 22 deletions .github/workflows/publish-eap.yml
Original file line number Diff line number Diff line change
@@ -1,32 +1,34 @@
name: Publish EAP
name: Publish EAP to the Marketplace

on:
# only works on 'master' branch as it is a default branch
workflow_run:
workflows: [ Check ]
types:
- completed
branches:
- master
# # only works on 'master' branch as it is a default branch
# workflow_run:
# workflows: [ Check ]
# types:
# - completed
# branches:
# - master
release:
types: [prereleased]

jobs:
check-for-tests-success:
runs-on: ubuntu-latest
permissions:
actions: write

steps:
- name: Early exit if tests wasn't successful
if: ${{ github.event.workflow_run.conclusion != 'success' }}
run: |
gh run cancel ${{ github.run_id }}
gh run watch ${{ github.run_id }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# check-for-tests-success:
# runs-on: ubuntu-latest
# permissions:
# actions: write
#
# steps:
# - name: Early exit if tests wasn't successful
# if: ${{ github.event.workflow_run.conclusion != 'success' }}
# run: |
# gh run cancel ${{ github.run_id }}
# gh run watch ${{ github.run_id }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


publish-eap-channel:
needs: [ check-for-tests-success ]
# needs: [ check-for-tests-success ]
strategy:
matrix:
gradle-properties-version: [ 242, 243-SNAPSHOT ]
Expand Down
76 changes: 76 additions & 0 deletions .github/workflows/publish-stable-on-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
name: Publish stable version to the Marketplace

on:
release:
types: [released]

jobs:
# check-for-tests-success:
# runs-on: ubuntu-latest
# permissions:
# actions: write
#
# steps:
# - name: Early exit if tests wasn't successful
# if: ${{ github.event.workflow_run.conclusion != 'success' }}
# run: |
# gh run cancel ${{ github.run_id }}
# gh run watch ${{ github.run_id }}
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}


publish-eap-channel:
# needs: [ check-for-tests-success ]
strategy:
matrix:
gradle-properties-version: [ 242, 243-SNAPSHOT ]

runs-on: ubuntu-latest
env:
ORG_GRADLE_PROJECT_shortPlatformVersion: ${{ matrix.gradle-properties-version }}
JB_PUB_TOKEN: ${{ secrets.JB_PUB_TOKEN }}

steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
distribution: 'corretto'
java-version: 21

- name: Setup Gradle and dependencies
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: wrapper
cache-read-only: false
arguments: ":resolveDependencies -Pkotlin.incremental=false --no-daemon"
gradle-home-cache-excludes: |
caches/modules-2/files-2.1/com.jetbrains.intellij.pycharm
caches/modules-2/files-2.1/com.jetbrains.intellij.idea
caches/modules-2/files-2.1/com.jetbrains.intellij.clion
- name: Build
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: wrapper
arguments: "assemble testClasses -Pkotlin.incremental=false --no-daemon --stacktrace"
gradle-home-cache-excludes: |
caches/modules-2/files-2.1/com.jetbrains.intellij.pycharm
caches/modules-2/files-2.1/com.jetbrains.intellij.idea
caches/modules-2/files-2.1/com.jetbrains.intellij.clion
- name: Publish to EAP channel
uses: gradle/actions/setup-gradle@v3
with:
gradle-version: wrapper
arguments: ":publishPlugin -Pkotlin.incremental=false --no-daemon --stacktrace"
gradle-home-cache-excludes: |
caches/modules-2/files-2.1/com.jetbrains.intellij.pycharm
caches/modules-2/files-2.1/com.jetbrains.intellij.idea
caches/modules-2/files-2.1/com.jetbrains.intellij.clion

0 comments on commit 6ca4b86

Please sign in to comment.