|
1 | | -name: Publish Package to npm |
2 | | - |
3 | | -on: |
4 | | - push: |
5 | | - branches: |
6 | | - - main |
7 | | - pull_request: |
8 | | - branches: |
9 | | - - main |
10 | | -permissions: write-all |
11 | | - |
12 | | -concurrency: |
13 | | - group: ${{ github.workflow }}-${{ github.ref }} |
14 | | - cancel-in-progress: false |
15 | | - |
16 | | -jobs: |
17 | | - benchmark: |
18 | | - runs-on: ubuntu-latest |
19 | | - steps: |
20 | | - - name: Checkout |
21 | | - uses: actions/checkout@v5 |
22 | | - |
23 | | - - uses: actions-rust-lang/setup-rust-toolchain@v1 |
24 | | - - name: Cargo tarpaulin and fmt |
25 | | - run: | |
26 | | - cargo install cargo-tarpaulin |
27 | | - rustup component add rustfmt clippy |
28 | | - - uses: pnpm/action-setup@v4 |
29 | | - name: Install pnpm |
30 | | - with: |
31 | | - run_install: false |
32 | | - |
33 | | - |
34 | | - with: |
35 | | - version: 'latest' |
36 | | - - name: Install Node.js |
37 | | - uses: actions/setup-node@v4 |
38 | | - with: |
39 | | - registry-url: "https://registry.npmjs.org" |
40 | | - node-version: 22 |
41 | | - cache: 'pnpm' |
42 | | - - run: pnpm i |
43 | | - - run: pnpm build |
44 | | - - name: Benchmark |
45 | | - run: pnpm benchmark |
46 | | - |
47 | | - publish: |
48 | | - runs-on: ubuntu-latest |
49 | | - steps: |
50 | | - - name: Checkout |
51 | | - uses: actions/checkout@v5 |
52 | | - |
53 | | - - uses: actions-rust-lang/setup-rust-toolchain@v1 |
54 | | - - name: Cargo tarpaulin and fmt |
55 | | - run: | |
56 | | - cargo install cargo-tarpaulin |
57 | | - rustup component add rustfmt clippy |
58 | | - - uses: pnpm/action-setup@v4 |
59 | | - name: Install pnpm |
60 | | - with: |
61 | | - run_install: false |
62 | | - |
63 | | - |
64 | | - with: |
65 | | - version: 'latest' |
66 | | - - name: Install Node.js |
67 | | - uses: actions/setup-node@v4 |
68 | | - with: |
69 | | - registry-url: "https://registry.npmjs.org" |
70 | | - node-version: 22 |
71 | | - cache: 'pnpm' |
72 | | - env: |
73 | | - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
74 | | - - run: pnpm i |
75 | | - - run: pnpm build |
76 | | - - run: | |
77 | | - pnpm lint |
78 | | - # rust coverage issue |
79 | | - echo 'max_width = 100000' > .rustfmt.toml |
80 | | - echo 'tab_spaces = 4' >> .rustfmt.toml |
81 | | - echo 'newline_style = "Unix"' >> .rustfmt.toml |
82 | | - echo 'fn_call_width = 100000' >> .rustfmt.toml |
83 | | - echo 'fn_params_layout = "Compressed"' >> .rustfmt.toml |
84 | | - echo 'chain_width = 100000' >> .rustfmt.toml |
85 | | - echo 'merge_derives = true' >> .rustfmt.toml |
86 | | - echo 'use_small_heuristics = "Default"' >> .rustfmt.toml |
87 | | - cargo fmt |
88 | | - - run: pnpm test |
89 | | - - name: Format Rollback |
90 | | - run: | |
91 | | - rm -rf .rustfmt.toml |
92 | | - cargo fmt |
93 | | - - name: Build Landing |
94 | | - run: | |
95 | | - pnpm -F components build-storybook |
96 | | - mv ./packages/components/storybook-static ./apps/landing/public/storybook |
97 | | - pnpm -F landing build |
98 | | - - name: Upload artifact |
99 | | - uses: actions/upload-pages-artifact@v3 |
100 | | - with: |
101 | | - path: ./apps/landing/out |
102 | | - if: github.event_name == 'push' && github.ref == 'refs/heads/main' |
103 | | - - uses: actions/deploy-pages@v4 |
104 | | - if: github.event_name == 'push' && github.ref == 'refs/heads/main' |
105 | | - - name: Upload to codecov.io |
106 | | - uses: codecov/codecov-action@v5 |
107 | | - with: |
108 | | - token: ${{ secrets.CODECOV_TOKEN }} |
109 | | - fail_ci_if_error: true |
110 | | - |
111 | | - - uses: changepacks/action@main |
112 | | - id: changepacks |
113 | | - |
114 | | - - name: Publish to npm |
115 | | - run: | |
116 | | - echo '${{ steps.changepacks.outputs.changepacks }}' | jq -r '.[]' | while read package; do |
117 | | - package_dir=$(dirname "$package") |
118 | | - echo "Publishing package: $package_dir" |
119 | | - cd "$package_dir" |
120 | | - pnpm publish --access public --no-git-checks |
121 | | - cd "${{ github.workspace }}" |
122 | | - done |
123 | | - env: |
124 | | - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
125 | | - if: steps.changepacks.outputs.changepacks != '' |
| 1 | +name: Publish Package to npm |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - main |
| 7 | + pull_request: |
| 8 | + branches: |
| 9 | + - main |
| 10 | +permissions: write-all |
| 11 | + |
| 12 | +concurrency: |
| 13 | + group: ${{ github.workflow }}-${{ github.ref }} |
| 14 | + cancel-in-progress: false |
| 15 | + |
| 16 | +jobs: |
| 17 | + benchmark: |
| 18 | + runs-on: ubuntu-latest |
| 19 | + steps: |
| 20 | + - name: Checkout |
| 21 | + uses: actions/checkout@v5 |
| 22 | + |
| 23 | + - uses: actions-rust-lang/setup-rust-toolchain@v1 |
| 24 | + - name: Cargo tarpaulin and fmt |
| 25 | + run: | |
| 26 | + cargo install cargo-tarpaulin |
| 27 | + rustup component add rustfmt clippy |
| 28 | + - uses: pnpm/action-setup@v4 |
| 29 | + name: Install pnpm |
| 30 | + with: |
| 31 | + run_install: false |
| 32 | + |
| 33 | + |
| 34 | + with: |
| 35 | + version: 'latest' |
| 36 | + - name: Install Node.js |
| 37 | + uses: actions/setup-node@v4 |
| 38 | + with: |
| 39 | + registry-url: "https://registry.npmjs.org" |
| 40 | + node-version: 22 |
| 41 | + cache: 'pnpm' |
| 42 | + - run: pnpm i |
| 43 | + - run: pnpm build |
| 44 | + - name: Benchmark |
| 45 | + run: pnpm benchmark |
| 46 | + |
| 47 | + publish: |
| 48 | + runs-on: ubuntu-latest |
| 49 | + steps: |
| 50 | + - name: Checkout |
| 51 | + uses: actions/checkout@v5 |
| 52 | + |
| 53 | + - uses: actions-rust-lang/setup-rust-toolchain@v1 |
| 54 | + - name: Cargo tarpaulin and fmt |
| 55 | + run: | |
| 56 | + cargo install cargo-tarpaulin |
| 57 | + rustup component add rustfmt clippy |
| 58 | + - uses: pnpm/action-setup@v4 |
| 59 | + name: Install pnpm |
| 60 | + with: |
| 61 | + run_install: false |
| 62 | + |
| 63 | + |
| 64 | + with: |
| 65 | + version: 'latest' |
| 66 | + - name: Install Node.js |
| 67 | + uses: actions/setup-node@v4 |
| 68 | + with: |
| 69 | + registry-url: "https://registry.npmjs.org" |
| 70 | + node-version: 22 |
| 71 | + cache: 'pnpm' |
| 72 | + env: |
| 73 | + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 74 | + - run: pnpm i |
| 75 | + - run: pnpm build |
| 76 | + - run: | |
| 77 | + pnpm lint |
| 78 | + # rust coverage issue |
| 79 | + echo 'max_width = 100000' > .rustfmt.toml |
| 80 | + echo 'tab_spaces = 4' >> .rustfmt.toml |
| 81 | + echo 'newline_style = "Unix"' >> .rustfmt.toml |
| 82 | + echo 'fn_call_width = 100000' >> .rustfmt.toml |
| 83 | + echo 'fn_params_layout = "Compressed"' >> .rustfmt.toml |
| 84 | + echo 'chain_width = 100000' >> .rustfmt.toml |
| 85 | + echo 'merge_derives = true' >> .rustfmt.toml |
| 86 | + echo 'use_small_heuristics = "Default"' >> .rustfmt.toml |
| 87 | + cargo fmt |
| 88 | + - run: pnpm test |
| 89 | + - name: Format Rollback |
| 90 | + run: | |
| 91 | + rm -rf .rustfmt.toml |
| 92 | + cargo fmt |
| 93 | + - name: Build Landing |
| 94 | + run: | |
| 95 | + pnpm -F components build-storybook |
| 96 | + mv ./packages/components/storybook-static ./apps/landing/public/storybook |
| 97 | + pnpm -F landing build |
| 98 | + - name: Upload artifact |
| 99 | + uses: actions/upload-pages-artifact@v3 |
| 100 | + with: |
| 101 | + path: ./apps/landing/out |
| 102 | + if: github.event_name == 'push' && github.ref == 'refs/heads/main' |
| 103 | + - uses: actions/deploy-pages@v4 |
| 104 | + if: github.event_name == 'push' && github.ref == 'refs/heads/main' |
| 105 | + - name: Upload to codecov.io |
| 106 | + uses: codecov/codecov-action@v5 |
| 107 | + with: |
| 108 | + token: ${{ secrets.CODECOV_TOKEN }} |
| 109 | + fail_ci_if_error: true |
| 110 | + |
| 111 | + - uses: changepacks/action@main |
| 112 | + id: changepacks |
| 113 | + with: |
| 114 | + publish: true |
| 115 | + env: |
| 116 | + NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |
0 commit comments