Skip to content

Commit

Permalink
Upgraded Kotlin to 1.8.22 + added action to update yarn.lock
Browse files Browse the repository at this point in the history
  • Loading branch information
nulls committed Sep 4, 2023
1 parent 905be80 commit 081e760
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 1 deletion.
51 changes: 51 additions & 0 deletions .github/workflows/kjs-yarn-update.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Update yarn.lock generated by Kotlin Gradle Plugin

on:
pull_request:
paths:
- 'gradle/libs.versions.toml'
- 'build.gradle.kts'
push:
paths:
- 'gradle/libs.versions.toml'
- 'build.gradle.kts'

jobs:
update_kjs_yarn_lock:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
if: github.event_name == 'pull_request'
with:
# Checkout source branch directly, without merging base into it
ref: ${{ github.event.pull_request.head.ref }}
- uses: actions/checkout@v3
if: github.event_name == 'push'
with:
# Checkout source branch directly, without merging base into it
ref: ${{ github.event.push.ref }}
- name: Generate yarn.lock
uses: gradle/gradle-build-action@v2
with:
gradle-version: wrapper
arguments: |
kotlinUpgradeYarnLock
--build-cache
-PgprUser=${{ github.actor }}
-PgprKey=${{ secrets.GITHUB_TOKEN }}
- name: Dedupe generated yarn.lock
run: |
npm install -g yarn-deduplicate
yarn-deduplicate
- name: Commit and push if yarn.lock is changed
run: |
git add yarn.lock
if git diff --staged --quiet; then
echo Everything is UP-TO-DATE
else
echo Pushing updated yarn.lock
git config user.name github-actions[bot]
git config user.email 'github-actions[bot]@users.noreply.github.com'
git commit -m "Update yarn.lock"
git push
fi
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[versions]
kotlin = "1.8.20"
kotlin = "1.8.22"
kotlinx-serialization = "1.5.1"
kotlinx-datetime = "0.4.0"
jackson = "2.15.2"
Expand Down

0 comments on commit 081e760

Please sign in to comment.