Skip to content

Fix types

Fix types #9

Workflow file for this run

name: CI
on: [push, pull_request, workflow_dispatch, release]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v1
- name: Build package
working-directory: src/js
run: |
mkdir -p generated
cp ../core/*.ts ./generated/
sed -i 's@../js/@../@g' ./generated/error_handling.ts
sed -i 's@from "types"@from "../types"@g' ./generated/pyproxy.ts
sed -i 's@from "pyodide-util"@from "../pyodide-util"@g' ./generated/pyproxy.ts
bun build pyodide.ts --outdir=dist --sourcemap=linked
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: build
path: src/js
preview:
runs-on: ubuntu-latest
needs: build
steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: build
path: .
- name: Publish to pkg.pr.new
run: npx pkg-pr-new publish
publish:
runs-on: ubuntu-latest
needs: build
permissions:
contents: write
id-token: write
steps:
- uses: actions/setup-node@v4
with:
node-version: latest
registry-url: https://registry.npmjs.org
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: build
path: .
- name: List files
run: tree -s -h
- name: Publish to npm
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: |
if [ "${{ github.event_name }}" == "release" ]; then
npm publish --provenance --access public
else
npm publish --provenance --access public --dry-run
fi