Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(npm/runtime): add @oxc-project/runtime package #8595

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft
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
57 changes: 57 additions & 0 deletions .github/workflows/release_runtime.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Release @oxc-project/runtime

on:
workflow_dispatch:
push:
branches:
- main
paths:
- npm/runtime/package.json

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
check:
name: Check version
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
version_changed: ${{ steps.version.outputs.changed }}
steps:
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1

- name: Check version changes
uses: EndBug/version-check@36ff30f37c7deabe56a30caa043d127be658c425 # v2
id: version
with:
static-checking: localIsNew
file-url: https://unpkg.com/@oxc-project/runtime/package.json
file-name: npm/runtime/package.json

- name: Set version name
if: steps.version.outputs.changed == 'true'
env:
VERSION_NUMBER: ${{ steps.version.outputs.version }}
VERSION_TYPE: ${{ steps.version.outputs.version_type }}
run: |
echo "Version change found! New version: ${VERSION_NUMBER} (${VERSION_TYPE})"
Comment on lines +16 to +39

Check warning

Code scanning / zizmor

overly broad permissions Warning

overly broad permissions
build:
needs: check
if: needs.check.outputs.version_changed == 'true'
name: Release @oxc-project/runtime
runs-on: ubuntu-latest
permissions:
id-token: write # for `pnpm publish --provenance`
steps:
- uses: taiki-e/checkout-action@b13d20b7cda4e2f325ef19895128f7ff735c0b3d # v1.3.1

- uses: ./.github/actions/pnpm

- name: Publish
working-directory: npm/oxc-runtime
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: pnpm publish --provenance --access public --no-git-checks
1 change: 1 addition & 0 deletions dprint.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"npm/*/package.json",
"npm/oxlint/configuration_schema.json",
"npm/oxc-wasm/**",
"npm/runtime/src",
".github/.generated_ast_watch_list.yml"
],
"plugins": [
Expand Down
5 changes: 5 additions & 0 deletions npm/runtime/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Oxc's modular runtime helpers

Code copied from the published package `@babel/runtime`.

All credits to the Babel team.
Loading
Loading