Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: modified yml #449

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions .github/workflows/test_auto.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Test Pull Request Auto CI

on:
pull_request:
types: [ opened, synchronize, reopened ]

jobs:
build:
name: Build
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Test Pull Request Auto CI
run: echo "Test Pull Request Auto CI"
16 changes: 12 additions & 4 deletions .github/workflows/wasm_publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,21 @@ on:
description: 'Working directory (e.g., libs/client-api-wasm)'
required: true
default: 'libs/client-api-wasm'
package_name:
description: 'Package name'
which_package:
description: 'Which package to publish'
required: true
default: '@appflowyinc/client-api-wasm'
type: choice
options:
- '@appflowyinc/client-api-wasm'
package_version:
description: 'Package version'
required: true
publish_args:
description: 'Publish arguments (e.g., --tag alpha)'
required: false
default: ''

env:
NODE_VERSION: '20.12.0'
RUST_TOOLCHAIN: "1.75"
Expand Down Expand Up @@ -46,7 +54,7 @@ jobs:
- name: Update package.json
run: |
cd ${{ github.event.inputs.working_directory }}/pkg
jq '.name = "${{ github.event.inputs.package_name }}" | .version = "${{ github.event.inputs.package_version }}"' package.json > package.json.tmp
jq '.name = "${{ github.event.inputs.which_package }}" | .version = "${{ github.event.inputs.package_version }}"' package.json > package.json.tmp
mv package.json.tmp package.json

- name: Configure npm for wasm-pack
Expand All @@ -55,7 +63,7 @@ jobs:
- name: Publish package
run: |
npm config set access public
wasm-pack publish
wasm-pack publish ${{ github.event.inputs.publish_args }}
working-directory: ${{ github.event.inputs.working_directory }}/pkg
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
4 changes: 3 additions & 1 deletion libs/client-api-wasm/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ authors = ["Admin"]
edition = "2018"

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


[features]
Expand Down Expand Up @@ -36,5 +36,7 @@ uuid.workspace = true
wasm-bindgen-test = "0.3.34"

[profile.release]
panic = "abort"
lto = true
# Tell `rustc` to optimize for small code size.
opt-level = "s"
Loading