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
48 changes: 43 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@ jobs:
- target: aarch64-apple-darwin
os: macos-latest
asset: ows-darwin-aarch64
- target: x86_64-pc-windows-msvc
os: windows-latest
asset: ows-windows-x86_64

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -57,18 +60,35 @@ jobs:
run: cargo zigbuild --release --target ${{ matrix.target }}.2.17

- name: Build (macOS)
if: "!contains(matrix.target, 'linux')"
if: contains(matrix.target, 'apple')
run: cargo build --release --target ${{ matrix.target }}

- name: Rename binary
- name: Build (Windows)
if: contains(matrix.target, 'windows')
run: cargo build --release --target ${{ matrix.target }}

- name: Rename binary (Unix)
if: "!contains(matrix.target, 'windows')"
run: cp target/${{ matrix.target }}/release/ows ${{ matrix.asset }}

- name: Upload artifact
- name: Rename binary (Windows)
if: contains(matrix.target, 'windows')
run: cp target/${{ matrix.target }}/release/ows.exe ${{ matrix.asset }}.exe

- name: Upload artifact (Unix)
if: "!contains(matrix.target, 'windows')"
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: ${{ matrix.asset }}
path: ows/${{ matrix.asset }}

- name: Upload artifact (Windows)
if: contains(matrix.target, 'windows')
uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # v5.0.0
with:
name: ${{ matrix.asset }}
path: ows/${{ matrix.asset }}.exe

python-wheels:
strategy:
matrix:
Expand All @@ -81,6 +101,8 @@ jobs:
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest

runs-on: ${{ matrix.os }}

Expand All @@ -97,6 +119,7 @@ jobs:
3.13

- name: Set version from tag
shell: bash
run: |
V="${GITHUB_REF_NAME#v}"
"$GITHUB_WORKSPACE/scripts/set-version.sh" "$V" --python
Expand Down Expand Up @@ -145,6 +168,8 @@ jobs:
os: macos-latest
- target: aarch64-apple-darwin
os: macos-latest
- target: x86_64-pc-windows-msvc
os: windows-latest

runs-on: ${{ matrix.os }}

Expand Down Expand Up @@ -176,7 +201,15 @@ jobs:
with:
tool: cargo-zigbuild

- name: Set version from tag
- name: Set version from tag (Unix)
if: "!contains(matrix.target, 'windows')"
run: |
V="${GITHUB_REF_NAME#v}"
"$GITHUB_WORKSPACE/scripts/set-version.sh" "$V" --node

- name: Set version from tag (Windows)
if: contains(matrix.target, 'windows')
shell: bash
run: |
V="${GITHUB_REF_NAME#v}"
"$GITHUB_WORKSPACE/scripts/set-version.sh" "$V" --node
Expand All @@ -199,7 +232,11 @@ jobs:
run: npx napi build --platform --release --target ${{ matrix.target }} --zig --zig-abi-suffix 2.17

- name: Build native addon (macOS)
if: "!contains(matrix.target, 'linux')"
if: contains(matrix.target, 'apple')
run: npx napi build --platform --release --target ${{ matrix.target }}

- name: Build native addon (Windows)
if: contains(matrix.target, 'windows')
run: npx napi build --platform --release --target ${{ matrix.target }}

- name: Upload artifact
Expand Down Expand Up @@ -269,6 +306,7 @@ jobs:
cp cli-binaries/ows-darwin-x86_64 npm/darwin-x64/ows && chmod +x npm/darwin-x64/ows
cp cli-binaries/ows-linux-x86_64 npm/linux-x64-gnu/ows && chmod +x npm/linux-x64-gnu/ows
cp cli-binaries/ows-linux-aarch64 npm/linux-arm64-gnu/ows && chmod +x npm/linux-arm64-gnu/ows
cp cli-binaries/ows-windows-x86_64.exe npm/win32-x64-msvc/ows.exe

- name: Publish platform packages
env:
Expand Down
4 changes: 4 additions & 0 deletions bindings/node/bin/ows
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@ const PLATFORM_MAP = {
pkg: "@open-wallet-standard/core-linux-arm64-gnu",
bin: "ows",
},
"win32-x64": {
pkg: "@open-wallet-standard/core-win32-x64-msvc",
bin: "ows.exe",
},
};

const key = `${platform}-${arch}`;
Expand Down
16 changes: 16 additions & 0 deletions bindings/node/npm/win32-x64-msvc/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"name": "@open-wallet-standard/core-win32-x64-msvc",
"version": "1.2.4",
"os": [
"win32"
],
"cpu": [
"x64"
],
"main": "ows-node.win32-x64-msvc.node",
"files": [
"ows-node.win32-x64-msvc.node",
"ows.exe"
],
"license": "MIT"
}
6 changes: 4 additions & 2 deletions bindings/node/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@
"x86_64-apple-darwin",
"aarch64-apple-darwin",
"x86_64-unknown-linux-gnu",
"aarch64-unknown-linux-gnu"
"aarch64-unknown-linux-gnu",
"x86_64-pc-windows-msvc"
]
}
},
Expand All @@ -34,7 +35,8 @@
"@open-wallet-standard/core-linux-x64-gnu": "1.2.4",
"@open-wallet-standard/core-linux-arm64-gnu": "1.2.4",
"@open-wallet-standard/core-darwin-x64": "1.2.4",
"@open-wallet-standard/core-darwin-arm64": "1.2.4"
"@open-wallet-standard/core-darwin-arm64": "1.2.4",
"@open-wallet-standard/core-win32-x64-msvc": "1.2.4"
},
"license": "MIT",
"files": [
Expand Down