Skip to content

Commit 22535f9

Browse files
ryan-williamsclaude
andcommitted
Update CI to use npm-dist for dist branch
Use npm-dist's new `prebuilt_dir` mode to manage the dist branch with merge commits (two parents: previous dist + source SHA). Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
1 parent 0de63ae commit 22535f9

1 file changed

Lines changed: 15 additions & 11 deletions

File tree

.github/workflows/ci.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,23 @@ env:
1111
jobs:
1212
test:
1313
runs-on: ubuntu-latest
14+
permissions:
15+
contents: write
1416
steps:
15-
- uses: actions/checkout@v3
17+
- uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
1620
- uses: Swatinem/rust-cache@v2
1721
- uses: jetli/wasm-pack-action@v0.4.0
18-
- run: wasm-pack build --target web
19-
- run: rm pkg/.gitignore
20-
- name: Push pkg/
21-
uses: s0/git-publish-subdir-action@develop
22-
env:
23-
REPO: self
24-
BRANCH: dist
25-
FOLDER: pkg
26-
MESSAGE: "{sha}: {msg}"
27-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
22+
23+
- name: Build WASM
24+
run: wasm-pack build --target web
25+
26+
- name: Push dist branch
27+
if: github.ref == 'refs/heads/main' && github.event_name == 'push'
28+
uses: runsascoded/npm-dist@v1.1
29+
with:
30+
prebuilt_dir: pkg
31+
2832
- run: cargo build
2933
- run: cargo test -- --nocapture

0 commit comments

Comments
 (0)