Skip to content

Commit 478ce9e

Browse files
Test building a release
1 parent 17c7289 commit 478ce9e

File tree

2 files changed

+32
-22
lines changed

2 files changed

+32
-22
lines changed

.github/workflows/release-insiders.yml

+29-20
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ name: Release Insiders
33
on:
44
push:
55
branches: [main]
6+
pull_request:
67

78
permissions:
89
contents: read
@@ -67,7 +68,7 @@ jobs:
6768
container:
6869
image: ghcr.io/napi-rs/napi-rs/nodejs-rust:lts-alpine
6970

70-
name: Build ${{ matrix.target }} (OXIDE)
71+
name: Build ${{ matrix.target }} (oxide)
7172
runs-on: ${{ matrix.os }}
7273
container: ${{ matrix.container }}
7374
timeout-minutes: 15
@@ -121,9 +122,8 @@ jobs:
121122
run: pnpm install --ignore-scripts --filter=!./playgrounds/*
122123

123124
- name: Build release
124-
run: pnpm run --filter ${{ env.OXIDE_LOCATION }} build
125+
run: pnpm run --filter ${{ env.OXIDE_LOCATION }} build:platform -- --target=${{ matrix.target }}
125126
env:
126-
RUST_TARGET: ${{ matrix.target }}
127127
JEMALLOC_SYS_WITH_LG_PAGE: ${{ matrix.page-size }}
128128

129129
- name: Strip debug symbols # https://github.com/rust-lang/rust/issues/46034
@@ -160,7 +160,7 @@ jobs:
160160
run: |
161161
sudo pkg install -y -f curl node libnghttp2 npm
162162
sudo npm install -g [email protected] --unsafe-perm=true
163-
curl -sSf https://static.rust-lang.org/rustup/archive/1.27.1/x86_64-unknown-freebsd/rustup-init --output rustup-init
163+
curl -sSf https://static.rust-lang.org/rustup/archive/1.27.1/${{ env.RUST_TARGET }} /rustup-init --output rustup-init
164164
chmod +x rustup-init
165165
./rustup-init -y --profile minimal
166166
source "$HOME/.cargo/env"
@@ -171,7 +171,7 @@ jobs:
171171
echo "~~~~ pnpm --version ~~~~"
172172
pnpm --version
173173
pnpm install --ignore-scripts --filter=!./playgrounds/* || true
174-
pnpm run --filter ${{ env.OXIDE_LOCATION }} build
174+
pnpm run --filter ${{ env.OXIDE_LOCATION }} build:platform -- --target=${{ env.RUST_TARGET }}
175175
strip -x ${{ env.OXIDE_LOCATION }}/*.node
176176
ls -la ${{ env.OXIDE_LOCATION }}
177177
- name: Upload artifacts
@@ -213,6 +213,9 @@ jobs:
213213
cache: 'pnpm'
214214
registry-url: 'https://registry.npmjs.org'
215215

216+
- name: Setup WASM target
217+
run: rustup target add wasm32-wasip1-threads
218+
216219
# Cargo already skips downloading dependencies if they already exist
217220
- name: Cache cargo
218221
uses: actions/cache@v4
@@ -272,19 +275,25 @@ jobs:
272275
- name: Lock pre-release versions
273276
run: node ./scripts/lock-pre-release-versions.mjs
274277

275-
- name: Publish
276-
run: pnpm --recursive publish --tag ${{ env.RELEASE_CHANNEL }} --no-git-checks
277-
env:
278-
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
279-
280-
- name: Trigger Tailwind Play update
281-
uses: actions/github-script@v7
278+
- name: Upload artifacts
279+
uses: actions/upload-artifact@v4
282280
with:
283-
github-token: ${{ secrets.TAILWIND_PLAY_TOKEN }}
284-
script: |
285-
await github.rest.actions.createWorkflowDispatch({
286-
owner: 'tailwindlabs',
287-
repo: 'play.tailwindcss.com',
288-
ref: 'master',
289-
workflow_id: 'upgrade-tailwindcss.yml'
290-
})
281+
name: tarballs
282+
path: dist/*.tgz
283+
284+
# - name: Publish
285+
# run: pnpm --recursive publish --tag ${{ env.RELEASE_CHANNEL }} --no-git-checks
286+
# env:
287+
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
288+
289+
# - name: Trigger Tailwind Play update
290+
# uses: actions/github-script@v7
291+
# with:
292+
# github-token: ${{ secrets.TAILWIND_PLAY_TOKEN }}
293+
# script: |
294+
# await github.rest.actions.createWorkflowDispatch({
295+
# owner: 'tailwindlabs',
296+
# repo: 'play.tailwindcss.com',
297+
# ref: 'master',
298+
# workflow_id: 'upgrade-tailwindcss.yml'
299+
# })

crates/node/package.json

+3-2
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,10 @@
5151
"scripts": {
5252
"artifacts": "napi artifacts",
5353
"build": "pnpm run build:platform && pnpm run build:wasm",
54-
"postbuild": "node ./scripts/move-artifacts.mjs",
5554
"build:platform": "napi build --platform --release --no-const-enum",
56-
"build:wasm": "napi build --release --target wasm32-wasip1-threads",
55+
"postbuild:platform": "node ./scripts/move-artifacts.mjs",
56+
"build:wasm": "napi build --release --target wasm32-wasip1-threads --no-const-enum",
57+
"postbuild:wasm": "node ./scripts/move-artifacts.mjs",
5758
"dev": "cargo watch --quiet --shell 'npm run build'",
5859
"build:debug": "napi build --platform --no-const-enum",
5960
"version": "napi version"

0 commit comments

Comments
 (0)