Skip to content

Commit

Permalink
Re-add native package folders and ensure wasm artifacts are downloaded (
Browse files Browse the repository at this point in the history
#31561)

* Re-add native package folders and update publish-native

* update jobs

* ensure wasm-binaries are downloaded

* only build-wasm on release
  • Loading branch information
ijjk authored Nov 18, 2021
1 parent eaf6e27 commit be2e863
Show file tree
Hide file tree
Showing 33 changed files with 244 additions and 19 deletions.
28 changes: 9 additions & 19 deletions .github/workflows/build_test_deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ jobs:
runs-on: ubuntu-latest
needs:
- build
- build-wasm
- build-native
- build-windows-i686
- build-windows-aarch64
Expand All @@ -504,10 +505,17 @@ jobs:
with:
path: ./*
key: ${{ github.sha }}

- uses: actions/download-artifact@v2
with:
name: next-swc-binaries
path: packages/next/build/swc/dist

- uses: actions/download-artifact@v2
with:
name: wasm-binaries
path: packages/next/build/swc/crates/wasm

- run: echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
- run: ./scripts/publish-native.js $GITHUB_REF
- run: ./scripts/publish-release.sh
Expand Down Expand Up @@ -1132,6 +1140,7 @@ jobs:

build-wasm:
needs: build
if: ${{ needs.build.outputs.isRelease == 'true' }}
strategy:
matrix:
target: [web, nodejs]
Expand Down Expand Up @@ -1180,22 +1189,3 @@ jobs:
path: packages/next/build/swc/crates/wasm/pkg-*

- run: ls packages/next/build/swc/crates/wasm

# - name: Publish
# run: |
# echo "//registry.npmjs.org/:_authToken=$NPM_TOKEN" >> ~/.npmrc
# (cd crates/wasm/pkg && npm publish --access public)
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

practice:
needs: build-wasm
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v2
with:
name: wasm-binaries
path: packages/next/build/swc/crates/wasm

- run: ls packages/next/build/swc/crates/wasm
1 change: 1 addition & 0 deletions packages/next/build/swc/crates/napi/npm/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
next-swc.*.node
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@next/swc-android-arm64`

This is the **android-arm64** binary for `@next/swc`
Binary file not shown.
18 changes: 18 additions & 0 deletions packages/next/build/swc/crates/napi/npm/android-arm64/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@next/swc-android-arm64",
"version": "0.0.0",
"os": [
"android"
],
"cpu": [
"arm64"
],
"main": "next-swc.android-arm64.node",
"files": [
"next-swc.android-arm64.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@next/swc-darwin-arm64`

This is the **aarch64-apple-darwin** binary for `@next/swc`
Binary file not shown.
18 changes: 18 additions & 0 deletions packages/next/build/swc/crates/napi/npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@next/swc-darwin-arm64",
"version": "0.0.0",
"os": [
"darwin"
],
"cpu": [
"arm64"
],
"main": "next-swc.darwin-arm64.node",
"files": [
"next-swc.darwin-arm64.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
3 changes: 3 additions & 0 deletions packages/next/build/swc/crates/napi/npm/darwin-x64/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@next/swc-darwin-x64`

This is the **x86_64-apple-darwin** binary for `@next/swc`
18 changes: 18 additions & 0 deletions packages/next/build/swc/crates/napi/npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@next/swc-darwin-x64",
"version": "0.0.0",
"os": [
"darwin"
],
"cpu": [
"x64"
],
"main": "next-swc.darwin-x64.node",
"files": [
"next-swc.darwin-x64.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@next/swc-linux-arm-gnueabihf`

This is the **linux-arm-gnueabihf** binary for `@next/swc`
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@next/swc-linux-arm-gnueabihf",
"version": "0.0.0",
"os": [
"linux"
],
"cpu": [
"arm"
],
"main": "next-swc.linux-arm-gnueabihf.node",
"files": [
"next-swc.linux-arm-gnueabihf.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@next/swc-linux-arm64-gnu`

This is the **linux-arm64-gnu** binary for `@next/swc`
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@next/swc-linux-arm64-gnu",
"version": "0.0.0",
"os": [
"linux"
],
"cpu": [
"arm64"
],
"main": "next-swc.linux-arm64-gnu.node",
"files": [
"next-swc.linux-arm64-gnu.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@next/swc-linux-arm64-musl`

This is the **linux-arm64-musl** binary for `@next/swc`
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@next/swc-linux-arm64-musl",
"version": "0.0.0",
"os": [
"linux"
],
"cpu": [
"arm64"
],
"main": "next-swc.linux-arm64-musl.node",
"files": [
"next-swc.linux-arm64-musl.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@next/swc-linux-x64-gnu`

This is the **x86_64-unknown-linux-gnu** binary for `@next/swc`
18 changes: 18 additions & 0 deletions packages/next/build/swc/crates/napi/npm/linux-x64-gnu/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@next/swc-linux-x64-gnu",
"version": "0.0.0",
"os": [
"linux"
],
"cpu": [
"x64"
],
"main": "next-swc.linux-x64-gnu.node",
"files": [
"next-swc.linux-x64-gnu.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@next/swc-linux-x64-musl`

This is the **linux-x64-musl** binary for `@next/swc`
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@next/swc-linux-x64-musl",
"version": "0.0.0",
"os": [
"linux"
],
"cpu": [
"x64"
],
"main": "next-swc.linux-x64-musl.node",
"files": [
"next-swc.linux-x64-musl.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@next/swc-win32-arm64-msvc`

This is the **win32-arm64-msvc** binary for `@next/swc`
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@next/swc-win32-arm64-msvc",
"version": "0.0.0",
"os": [
"win32"
],
"cpu": [
"arm64"
],
"main": "next-swc.win32-arm64-msvc.node",
"files": [
"next-swc.win32-arm64-msvc.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@next/swc-win32-ia32-msvc`

This is the **win32-ia32-msvc** binary for `@next/swc`
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@next/swc-win32-ia32-msvc",
"version": "0.0.0",
"os": [
"win32"
],
"cpu": [
"ia32"
],
"main": "next-swc.win32-ia32-msvc.node",
"files": [
"next-swc.win32-ia32-msvc.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@next/swc-win32-x64-msvc`

This is the **x86_64-pc-windows-msvc** binary for `@next/swc`
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"name": "@next/swc-win32-x64-msvc",
"version": "0.0.0",
"os": [
"win32"
],
"cpu": [
"x64"
],
"main": "next-swc.win32-x64-msvc.node",
"files": [
"next-swc.win32-x64-msvc.node"
],
"license": "MIT",
"engines": {
"node": ">= 10"
}
}
3 changes: 3 additions & 0 deletions packages/next/build/swc/crates/wasm/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# `@next/swc-wasm`

This is the **wasm** binary for `@next/swc`

0 comments on commit be2e863

Please sign in to comment.