From 502846740c483e9b47f2a97057fd43c1e1cd8cf0 Mon Sep 17 00:00:00 2001
From: OJ Kwon <1210596+kwonoj@users.noreply.github.com>
Date: Fri, 2 Dec 2022 16:48:22 -0800
Subject: [PATCH] ci(actions): trying to create auto upgrade PR for swc_*

---
 bump-swc_core.yml | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 bump-swc_core.yml

diff --git a/bump-swc_core.yml b/bump-swc_core.yml
new file mode 100644
index 0000000..a6c5134
--- /dev/null
+++ b/bump-swc_core.yml
@@ -0,0 +1,39 @@
+name: Bump up swc_core
+  on:
+    schedule:
+      # two times daily, at 12:00 and 06:00
+      - cron: '0 0 * * *'
+      - cron: '0 6 * * *'
+
+jobs:
+  upgrade-swc-core:
+    runs-on: ubuntu-latest
+
+    steps:
+    - uses: actions/checkout@v2
+      with:
+        submodules: true
+
+    - uses: actions/cache@v3
+      with:
+        path: |
+          ~/.cargo/bin/
+        key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
+
+    - name: Install Rust
+      uses: actions-rs/toolchain@v1
+      with:
+        profile: minimal
+        override: true
+
+    - uses: Swatinem/rust-cache@v2
+      with:
+        shared-key: "gha-cargo-upgrade"
+        cache-on-failure: true
+
+    - name: Run cargo upgrade
+      uses: kwonoj/gha-cargo-upgrade@latest
+      with:
+        token: ${{ secrets.GHA_UPGRADE_TOKEN }}
+        packages: "swc_core"
+        incompatible: true