mirror of
https://github.com/Z3Prover/z3
synced 2026-07-22 06:55:51 +00:00
The `WebAssembly Publish` workflow was failing in the `Publish` step
after a successful build/test pass. The failure was isolated to npm
publication, indicating the job was not running with the intended
release-scoped publish configuration.
- **Workflow wiring**
- Attach the `publish` job in `.github/workflows/wasm-release.yml` to
the existing `release` environment.
- Align the wasm npm publish path with the repository’s other release
publishing jobs that already rely on environment-scoped release
configuration.
- **Effect**
- Ensures the final `npm publish` step executes in the same release
context as other artifact publication jobs.
- Avoids publishing with default job context when release-specific
configuration is required.
```yaml
jobs:
publish:
name: Publish
runs-on: ubuntu-latest
environment: release
```
---------
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
67 lines
1.5 KiB
YAML
67 lines
1.5 KiB
YAML
name: WebAssembly Publish
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
release:
|
|
types: [published]
|
|
|
|
defaults:
|
|
run:
|
|
working-directory: src/api/js
|
|
|
|
env:
|
|
EM_VERSION: 3.1.73
|
|
|
|
permissions:
|
|
contents: read # to fetch code (actions/checkout)
|
|
|
|
jobs:
|
|
publish:
|
|
name: Publish
|
|
runs-on: ubuntu-latest
|
|
environment: release
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v7.0.0
|
|
|
|
- name: Setup node
|
|
uses: actions/setup-node@v7
|
|
with:
|
|
node-version: "22"
|
|
registry-url: "https://registry.npmjs.org"
|
|
|
|
- name: Prepare for publish
|
|
run: |
|
|
npm version $(node -e 'console.log(fs.readFileSync("../../../.github/workflows/release.yml", "utf8").match(/RELEASE_VERSION:\s*\x27(\S+)\x27/)[1])')
|
|
mv PUBLISHED_README.md README.md
|
|
cp ../../../LICENSE.txt .
|
|
|
|
- name: Setup emscripten
|
|
uses: mymindstorm/setup-emsdk@v16
|
|
with:
|
|
no-install: true
|
|
version: ${{env.EM_VERSION}}
|
|
actions-cache-folder: "emsdk-cache"
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Build TypeScript
|
|
run: npm run build:ts
|
|
|
|
- name: Build wasm
|
|
run: |
|
|
emsdk install ${EM_VERSION}
|
|
emsdk activate ${EM_VERSION}
|
|
source $(dirname $(which emsdk))/emsdk_env.sh
|
|
which node
|
|
which clang++
|
|
npm run build:wasm
|
|
|
|
- name: Test
|
|
run: npm test
|
|
|
|
- name: Publish
|
|
run: npm publish
|
|
env:
|
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|