Skip to content

Commit

Permalink
chore: Resolve conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
空堂 committed Dec 26, 2023
2 parents b1a9527 + 90aa9b2 commit ded58f1
Show file tree
Hide file tree
Showing 89 changed files with 4,633 additions and 3,831 deletions.
2 changes: 1 addition & 1 deletion .github/actions/clone-crates/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ inputs:
required: false
type: string
ref:
default: 'v0.3.6'
default: 'v0.4.3'
required: false
type: string
temp:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ jobs:
- name: Install Rust Toolchain
uses: ./.github/actions/rustup
with:
save-cache: ${{ github.ref_name == 'main' }}
save-cache: ${{ github.ref_name == 'master' }}
shared-key: check

# Compile test without debug info for reducing the CI cache size
Expand Down
26 changes: 16 additions & 10 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,41 @@ jobs:
matrix:
settings:
- host: macos-latest
name: darwin-x64
target: x86_64-apple-darwin
build: |
cd crates/node_binding
pnpm build
strip -x *.node
- host: windows-latest
build: cd crates/node_binding && pnpm build
name: win32-x64-msvc
target: x86_64-pc-windows-msvc
- host: ubuntu-latest
target: x86_64-unknown-linux-gnu
name: linux-x64-gnu
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-debian
build: |-
set -e &&
cd crates/node_binding &&
unset CC_x86_64_unknown_linux_gnu && unset CC &&
pnpm build --target x86_64-unknown-linux-gnu &&
npm run build -- --target x86_64-unknown-linux-gnu &&
strip *.node
- host: ubuntu-latest
name: linux-x64-musl
target: x86_64-unknown-linux-musl
docker: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
build: cd crates/node_binding && set -e && pnpm build && strip *.node
- host: macos-latest
name: darwin-arm64
target: aarch64-apple-darwin
build: |
cd crates/node_binding
pnpm build --target aarch64-apple-darwin
strip -x *.node
- host: windows-latest
target: aarch64-pc-windows-msvc
name: win32-arm64-msvc
build: cd crates/node_binding && pnpm build --target aarch64-pc-windows-msvc
name: stable - ${{ matrix.settings.target }} - node@18
runs-on: ${{ matrix.settings.host }}
Expand All @@ -70,7 +76,7 @@ jobs:
uses: dtolnay/rust-toolchain@stable
if: ${{ !matrix.settings.docker }}
with:
toolchain: nightly-2023-06-02
toolchain: nightly-2023-10-24
targets: ${{ matrix.settings.target }}

- name: Cache cargo
Expand Down Expand Up @@ -102,7 +108,7 @@ jobs:
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: bindings-${{ matrix.settings.target }}
name: ${{ env.APP_NAME }}.${{ matrix.settings.name }}.node
path: crates/node_binding/${{ env.APP_NAME }}.*.node
if-no-files-found: error
universal-macOS:
Expand All @@ -117,19 +123,19 @@ jobs:
- name: Download macOS x64 artifact
uses: actions/download-artifact@v3
with:
name: bindings-x86_64-apple-darwin
path: crates/node_binding/
name: ${{ env.APP_NAME }}.darwin-x64.node
path: crates/node_binding/artifacts
- name: Download macOS arm64 artifact
uses: actions/download-artifact@v3
with:
name: bindings-aarch64-apple-darwin
path: crates/node_binding/
name: ${{ env.APP_NAME }}.darwin-arm64.node
path: crates/node_binding/artifacts
- name: Combine binaries
run: cd crates/node_binding && pnpm universal
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: bindings-universal-apple-darwin
name: ${{ env.APP_NAME }}.darwin-universal.node
path: crates/node_binding/${{ env.APP_NAME }}.*.node
if-no-files-found: error
publish:
Expand All @@ -144,15 +150,15 @@ jobs:
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: crates/node_binding
path: crates/node_binding/artifacts
- name: Move artifacts
run: cd crates/node_binding && pnpm artifacts
- name: List packages
run: ls -R ./crates/node_binding/npm
shell: bash
- name: Publish
run: |
npm config set provenance true
cd crates/node_binding && npm config set provenance true
if git log -1 --pretty=%B | grep "^[0-9]\+\.[0-9]\+\.[0-9]\+$";
then
echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
Expand Down
Loading

0 comments on commit ded58f1

Please sign in to comment.