Skip to content

fix(@swc/types): tsc build file ignored by npm (#9754) #93

fix(@swc/types): tsc build file ignored by npm (#9754)

fix(@swc/types): tsc build file ignored by npm (#9754) #93

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: "[email protected]"
GIT_COMMITTER_NAME: "SWC Bot"
GIT_COMMITTER_EMAIL: "[email protected]"
# 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: [email protected]
- name: Install cargo-mono
uses: taiki-e/install-action@v2
with:
tool: [email protected]
- 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)