Skip to content

Commit

Permalink
Finalize js deploy action (#4)
Browse files Browse the repository at this point in the history
* install deps

* publish package

* revert back to rust 1.81

* re-use wasm-opt

* remove required input param
  • Loading branch information
nudded authored Nov 29, 2024
1 parent 0ee85b1 commit ab02330
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 25 deletions.
17 changes: 12 additions & 5 deletions .github/workflows/javascript.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,7 @@ on:
release:
types: [released]
workflow_dispatch:
inputs:
version:
description: Version
required: true

env:
CARGO_TERM_COLOR: always

Expand All @@ -19,9 +16,19 @@ jobs:
working-directory: ./expression-js
steps:
- uses: actions/checkout@v4
- name: Install
- uses: actions/setup-node@v3
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: Install wasm-pack
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- name: Install dependencies
run: npm i
- name: Build
run: npm run build
- name: Package
run: wasm-pack pack
- name: Publish
run: wasm-pack publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
26 changes: 13 additions & 13 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 2 additions & 6 deletions expression-js/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
[package]
name = "expression-js"
version = "0.1.0"
name = "lago-expression"
version = "0.1.1"
edition = "2021"


[lib]
crate-type = ["cdylib"]

Expand All @@ -18,6 +17,3 @@ web-sys = { version = "0.3.72", features = ["console"] }
[profile.release]
lto = true
opt-level = 's'

[package.metadata.wasm-pack.profile.release]
wasm-opt = false
3 changes: 2 additions & 1 deletion expression-js/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions expression-js/package.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"name": "lago-expression",
"scripts": {
"build": "webpack",
"serve": "webpack serve"
Expand Down
2 changes: 2 additions & 0 deletions expression-js/rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[toolchain]
channel = "1.81"

0 comments on commit ab02330

Please sign in to comment.