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
31 changes: 25 additions & 6 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ env:
RELEASE_DIR: artifacts
GITHUB_REF: '${{ github.ref }}'
WINDOWS_TARGET: x86_64-pc-windows-msvc
MACOS_TARGET: x86_64-apple-darwin
MACOS_AMD64_TARGET: x86_64-apple-darwin
MACOS_ARM64_TARGET: aarch64-apple-darwin
LINUX_AMD64_TARGET: x86_64-unknown-linux-musl
LINUX_ARM64_TARGET: aarch64-unknown-linux-musl

Expand All @@ -30,6 +31,9 @@ jobs:
- target: aarch64-unknown-linux-musl
os: ubuntu-latest
rust: stable
- target: aarch64-apple-darwin
os: macos-latest
rust: stable
- target: x86_64-apple-darwin
os: macos-latest
rust: stable
Expand Down Expand Up @@ -141,10 +145,15 @@ jobs:
with:
name: ${{ env.WINDOWS_TARGET }}

- name: Download MacOS tarball
- name: Download MacOS amd64 tarball
uses: actions/[email protected]
with:
name: ${{ env.MACOS_TARGET }}
name: ${{ env.MACOS_AMD64_TARGET }}

- name: Download MacOS arm64 tarball
uses: actions/[email protected]
with:
name: ${{ env.MACOS_ARM64_TARGET }}

- name: Release Linux amd64 tarball
uses: actions/upload-release-asset@v1
Expand Down Expand Up @@ -186,12 +195,22 @@ jobs:
asset_content_type: application/vnd.microsoft.portable-executable
asset_name: wasm-pack-init.exe

- name: Release MacOS tarball
- name: Release MacOS amd64 tarball
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./wasm-pack-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS_AMD64_TARGET }}.tar.gz
asset_content_type: application/gzip
asset_name: wasm-pack-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS_AMD64_TARGET }}.tar.gz

- name: Release MacOS arm64 tarball
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./wasm-pack-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS_TARGET }}.tar.gz
asset_path: ./wasm-pack-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS_ARM64_TARGET }}.tar.gz
asset_content_type: application/gzip
asset_name: wasm-pack-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS_TARGET }}.tar.gz
asset_name: wasm-pack-${{ steps.get_version.outputs.VERSION }}-${{ env.MACOS_ARM64_TARGET }}.tar.gz
5 changes: 4 additions & 1 deletion npm/binary.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,12 @@ const getPlatform = () => {
if (type === "Linux" && arch === "arm64") {
return "aarch64-unknown-linux-musl";
}
if (type === "Darwin" && (arch === "x64" || arch === "arm64")) {
if (type === "Darwin" && arch === "x64") {
return "x86_64-apple-darwin";
}
if (type === "Darwin" && arch === "arm64") {
return "aarch64-apple-darwin";
}

throw new Error(`Unsupported platform: ${type} ${arch}`);
};
Expand Down
Loading