-
-
Notifications
You must be signed in to change notification settings - Fork 28
67 lines (63 loc) · 1.86 KB
/
publish.yml
File metadata and controls
67 lines (63 loc) · 1.86 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
name: Publish Package to npm
on:
push:
branches:
- main
pull_request:
branches:
- main
permissions: write-all
jobs:
publish:
runs-on: ubuntu-latest
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: false
steps:
- name: Checkout
uses: actions/checkout@v4
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Cargo tarpaulin
run: cargo install cargo-tarpaulin
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
run_install: false
- uses: jetli/wasm-pack-action@v0.4.0
with:
version: 'latest'
- name: Install Node.js
uses: actions/setup-node@v4
with:
registry-url: "https://registry.npmjs.org"
node-version: 22
cache: 'pnpm'
- run: pnpm i
- run: |
pnpm build
pnpm lint
pnpm test
- name: Build Landing
run: pnpm -F landing build
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./apps/landing/out
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
- uses: actions/deploy-pages@v4
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
- name: Upload to codecov.io
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
fail_ci_if_error: true
- name: Create Release Pull Request or Publish to npm
id: changesets
uses: changesets/action@v1
with:
publish: pnpm changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
if: github.ref == 'refs/heads/main'