forked from VirusTotal/yara-x
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (37 loc) · 1.24 KB
/
publish_npm_package.yaml
File metadata and controls
48 lines (37 loc) · 1.24 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
name: Publish NPM package
on:
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout sources
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: stable
target: wasm32-unknown-unknown
- name: Install Node.js
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0
with:
node-version: 24
registry-url: https://registry.npmjs.org/
- name: Install toml
run: pip install toml
- name: Install wasm-pack
run: cargo install --locked wasm-pack
- name: Install wasm-opt
run: cargo install --locked wasm-opt
- name: Install wasm-bindgen
run: cargo install --locked wasm-bindgen-cli
- name: Sync version
run: python .github/scripts/sync_version.py
- name: Build and publish package
run: cd js-wasm && npm publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}