Skip to content
Open
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
36 changes: 27 additions & 9 deletions .github/workflows/CI.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ jobs:
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
build: |-
build: |
rustup install 1.86.0 &&
rustup default 1.86.0 &&
set -e &&
yarn build --target x86_64-unknown-linux-gnu &&
strip *.node
Expand Down Expand Up @@ -165,10 +167,8 @@ jobs:
crates/uroborosql-fmt-wasm/pkg/uroborosql_fmt_wasm_bg.wasm
if-no-files-found: error

deploy-to-gh-pages:
if: github.repository == 'future-architect/uroborosql-fmt' &&
contains('refs/heads/main', github.ref) && github.event_name == 'push'
needs: [build-wasm, build-napi]
package-napi:
needs: build-napi
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -184,7 +184,6 @@ jobs:
run: yarn install

# *.node のダウンロード
# TODO: まとめてダウンロードできないか?
- name: Download .node file for aarch64-apple-darwin
uses: actions/download-artifact@v4
with:
Expand Down Expand Up @@ -222,9 +221,28 @@ jobs:
cd repo
npm pack
cd ..
cd ..
cd ..
mv ${{ env.WORKING_DIR }}/repo/*.tgz ./wasm
mv repo/*.tgz ./

- name: Upload npm pack artifact
uses: actions/upload-artifact@v4
with:
name: napi-package
path: ${{ env.WORKING_DIR }}/*.tgz
if-no-files-found: error

deploy-to-gh-pages:
if: github.repository == 'future-architect/uroborosql-fmt' &&
contains('refs/heads/main', github.ref) && github.event_name == 'push'
needs: [build-wasm, package-napi]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Download npm pack artifact
uses: actions/download-artifact@v4
with:
name: napi-package
path: ./wasm

- name: Download wasm
uses: actions/download-artifact@v4
Expand Down
Loading
Loading