Skip to content

Update kotlin monorepo to v2.1.0 (#85) #227

Update kotlin monorepo to v2.1.0 (#85)

Update kotlin monorepo to v2.1.0 (#85) #227

Workflow file for this run

name: CI
on:
push:
branches:
- main
tags:
- '*.*.*'
pull_request:
jobs:
danger-pr:
runs-on: ubuntu-latest
if: ${{ github.event_name == 'pull_request' }}
name: "danger-pr"
container:
image: docker://ghcr.io/danger/danger-kotlin:1.3.1
steps:
- uses: actions/checkout@v4
- name: Run Danger
run: danger-kotlin ci --failOnErrors --no-publish-check
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build and run checks
id: gradle-check
run: |
./gradlew --quiet --continue --no-configuration-cache \
check
- name: Build sample app
id: gradle-sample-build
run: |
./gradlew --quiet --continue --no-configuration-cache \
:sample:desktopApp:build
- name: (Fail-only) Upload reports
if: failure()
uses: actions/upload-artifact@v4
with:
name: reports-build
path: |
**/build/reports/**
publish:
runs-on: macos-latest
timeout-minutes: 60
needs: [ build ]
if: github.repository == 'r0adkll/kimchi' && github.ref == 'refs/heads/main'
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: 17
- name: Setup Gradle
uses: gradle/actions/setup-gradle@v4
- name: Publish snapshot (main branch only)
run: ./gradlew publish -PmavenCentralUsername=${{ secrets.SONATYPEUSERNAME }} -PmavenCentralPassword=${{ secrets.SONATYPEPASSWORD }} --no-configuration-cache
create-release:
runs-on: ubuntu-latest
needs: [ build ]
if: github.repository == 'r0adkll/kimchi' && contains(github.ref, 'refs/tags/')
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Extract release notes
id: extract-release-notes
uses: ffurrer2/extract-release-notes@v2
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh release create ${{ github.ref_name }} \
--title ${{ github.ref_name }} \
--notes '${{ steps.extract-release-notes.outputs.release_notes }}'