Skip to content

Commit

Permalink
chore(ci): Bump crates before publishing (#9308)
Browse files Browse the repository at this point in the history
**Related issue:**

 - Closes #9304
  • Loading branch information
kdy1 committed Jul 22, 2024
1 parent 7514d9b commit a6d1db8
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 5 deletions.
36 changes: 35 additions & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
8 changes: 4 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit a6d1db8

Please sign in to comment.