Update kotlin monorepo to v2.4.10 #427
This file contains hidden or 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
| name: CI | |
| on: pull_request | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, macos-latest] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up JDK 23 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: "temurin" | |
| java-version: 23 | |
| cache: gradle | |
| - name: Setup Gradle | |
| uses: gradle/actions/setup-gradle@v4 | |
| - name: Install Kotlin | |
| run: | | |
| curl -o kotlin-compiler.zip -L https://github.com/JetBrains/kotlin/releases/download/v2.1.10/kotlin-compiler-2.1.10.zip | |
| if [[ "$OSTYPE" != "darwin"* ]] | |
| then | |
| sudo chmod -R a+rwx /usr/local/ | |
| unzip -d /usr/local/bin kotlin-compiler.zip | |
| echo "/usr/local/bin/kotlinc/bin" >> $GITHUB_PATH | |
| rm -rf kotlin-compiler.zip | |
| fi | |
| - uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22.21.1' | |
| - name: Install Danger JS | |
| run: npm install -g danger | |
| - name: Install Danger Kotlin | |
| run: sudo make install | |
| - name: Check if upload jar label applied to PR | |
| id: upload-jar-check | |
| run: | | |
| if gh api --jq '.labels.[].name' /repos/{owner}/{repo}/pulls/${{ github.event.number }} | grep -q "Upload Jar" | |
| then | |
| echo "UPLOAD_JAR=true" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "UPLOAD_JAR=false" >> "$GITHUB_OUTPUT" | |
| fi | |
| env: | |
| GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Upload danger-kotlin.jar | |
| uses: actions/upload-artifact@v5 | |
| if: ${{ steps.upload-jar-check.outputs.UPLOAD_JAR == true}} | |
| with: | |
| name: danger-kotlin.jar | |
| path: danger-kotlin-library/build/libs/danger-kotlin.jar | |
| - name: Run tests | |
| run: sudo ./gradlew danger-kotlin-library:test | |
| - name: Build and Install Sample Plugin | |
| run: sudo ./gradlew installDangerPlugin --no-configuration-cache | |
| - name: Run Danger-Kotlin | |
| run: DEBUG='*' danger-kotlin ci --dangerfile Dangerfile_ci.df.kts | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| verify-plugin: | |
| name: Verify Plugin | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Set up JDK 23 | |
| uses: actions/setup-java@v5 | |
| with: | |
| distribution: "temurin" | |
| java-version: 23 | |
| cache: gradle | |
| - name: Verify Plugin | |
| run: ./gradlew :intellij-plugin:verifyPlugin |