From a6d1db861187281a7cc7be69ec1c096b108439d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Donny/=EA=B0=95=EB=8F=99=EC=9C=A4?= Date: Mon, 22 Jul 2024 11:55:51 +0900 Subject: [PATCH] chore(ci): Bump crates before publishing (#9308) **Related issue:** - Closes https://github.com/swc-project/swc/issues/9304 --- .github/workflows/publish.yml | 36 ++++++++++++++++++++++++++++++++++- Cargo.lock | 8 ++++---- 2 files changed, 39 insertions(+), 5 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index e27d0b509d3f..c9173ba6ce77 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -40,9 +40,44 @@ concurrency: cancel-in-progress: true jobs: + cargo-bump: + name: "Bump crates" + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions-rs/toolchain@v1 + with: + profile: minimal + + - name: Install cargo-edit + uses: baptiste0928/cargo-install@v2.2.0 + with: + crate: cargo-edit + version: "0.12.2" + locked: true + + - name: Install cargo-mono + uses: baptiste0928/cargo-install@v2.2.0 + with: + crate: cargo-mono + version: "0.3.7" + + - run: cargo bump + + - uses: webfactory/ssh-agent@v0.5.4 + with: + ssh-private-key: ${{ secrets.SWC_BOT_SSH }} + + - name: Push bump commit + run: | + git push git@github.com:swc-project/swc.git --no-verify + publish-cargo: name: "Publish cargo crates" runs-on: ubuntu-latest + needs: + - cargo-bump steps: - uses: actions/checkout@v4 @@ -64,7 +99,6 @@ jobs: with: crate: cargo-mono version: "0.3.7" - locked: true - name: Update constant of swc_core run: npx ts-node .github/bot/src/cargo/update-constants.ts diff --git a/Cargo.lock b/Cargo.lock index 2845a406c248..da0db2813371 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -2510,9 +2510,9 @@ checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" [[package]] name = "openssl" -version = "0.10.62" +version = "0.10.66" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8cde4d2d9200ad5909f8dac647e29482e07c3a35de8a13fce7c9c7747ad9f671" +checksum = "9529f4786b70a3e8c61e11179af17ab6188ad8d0ded78c5529441ed39d4bd9c1" dependencies = [ "bitflags 2.5.0", "cfg-if", @@ -2542,9 +2542,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.98" +version = "0.9.103" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c1665caf8ab2dc9aef43d1c0023bd904633a6a05cb30b0ad59bec2ae986e57a7" +checksum = "7f9e8deee91df40a943c71b917e5874b951d32a802526c85721ce3b776c929d6" dependencies = [ "cc", "libc",