Skip to content

perf(preset-env): Store Versions in Arc (#9950) #249

perf(preset-env): Store Versions in Arc (#9950)

perf(preset-env): Store Versions in Arc (#9950) #249

name: "Publish crates (auto)"
env:
CI: 1
# 7 GiB by default on GitHub, setting to 6 GiB
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners#supported-runners-and-hardware-resources
NODE_OPTIONS: --max-old-space-size=6144
GIT_AUTHOR_NAME: "SWC Bot"
GIT_AUTHOR_EMAIL: "bot@swc.rs"
GIT_COMMITTER_NAME: "SWC Bot"
GIT_COMMITTER_EMAIL: "bot@swc.rs"
# https://github.com/actions/setup-node/issues/899#issuecomment-1819151595
SKIP_YARN_COREPACK_CHECK: 1
on:
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}
cancel-in-progress: true
jobs:
publish-cargo:
name: "Publish cargo crates"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-node
- uses: actions-rs/toolchain@v1
with:
profile: minimal
- name: Install cargo-edit
uses: taiki-e/install-action@v2
with:
tool: cargo-edit@0.12.2
- name: Install cargo-mono
uses: taiki-e/install-action@v2
with:
tool: cargo-mono@0.4.1
- name: Update constant of swc_core
run: npx ts-node .github/bot/src/cargo/update-constants.ts
- name: Publish crates
env:
CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}
run: |
cargo mono publish --no-verify
(cd bindings && cargo mono publish --no-verify)