-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
54 lines (44 loc) · 1.36 KB
/
publish-crates.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
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