-
Notifications
You must be signed in to change notification settings - Fork 3
44 lines (40 loc) · 1.18 KB
/
Copy pathpublish.yml
File metadata and controls
44 lines (40 loc) · 1.18 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
# https://github.com/changesets/action
name: Release Package
on:
workflow_dispatch:
pull_request:
types:
- closed
branches: # target branch
- master
permissions:
pull-requests: write
contents: write
jobs:
release-package:
if: github.event.pull_request.merged || github.event_name == 'workflow_dispatch'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
with:
toolchain: stable
target: wasm32-unknown-unknown
- name: Install wasm-pack
run: cargo install wasm-pack && wasm-pack --version
- uses: actions/setup-node@v3
with:
node-version: 22
- uses: pnpm/action-setup@v4
with:
run_install: true
# consume changesets and create pr if it exists, otherwise publish package
- name: Create Release Pull Request or Publish to npm
uses: changesets/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
with:
publish: npx changeset publish
commit: 'chore: versioning package'
title: 'chore:versioning package'