Skip to content
Merged
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
8 changes: 8 additions & 0 deletions .changeset/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Changesets

Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
with multi-package repos, or single-package repos to help you version and publish your code. You can
find the full documentation for it [in our repository](https://github.com/changesets/changesets)

We have a quick list of common questions to get you started engaging with this project in
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
14 changes: 14 additions & 0 deletions .changeset/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
"changelog": [
"@changesets/changelog-github",
{ "repo": "cloudflare/capnweb" }
],
"commit": false,
"fixed": [],
"linked": [],
"access": "public",
"baseBranch": "main",
"updateInternalDependencies": "patch",
"ignore": []
}
5 changes: 5 additions & 0 deletions .changeset/good-glasses-see.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"capnweb": patch
---

Trigger a first release
27 changes: 27 additions & 0 deletions .github/workflows/pkg-pr-new.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Publish to pkg.pr.new for pre-release
permissions:
contents: read

on:
pull_request: {}

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1
- uses: actions/setup-node@v4
with:
node-version: 22
cache: "npm"

- name: Install dependencies
run: npm ci

- name: Build packages
run: npm run build

- name: Publish to pkg.pr.new
run: npx pkg-pr-new publish
69 changes: 69 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: Release
permissions:
contents: write # to create release (changesets/action)
issues: write # to post issue comments (changesets/action)
pull-requests: write # to create pull request (changesets/action)
id-token: write # to use OpenID Connect token for provenance (changesets/action)

on:
workflow_run:
workflows: ["Test"]
branches: [main]
types: [completed]

jobs:
release:
if: ${{ github.event.workflow_run.conclusion == 'success' && github.repository_owner == 'cloudflare' }}
timeout-minutes: 5
runs-on: ubuntu-latest
environment: release

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: actions/setup-node@v4
with:
node-version: 24 # includes npm 11.5.1 or later, needed for trusted publishing
cache: "npm"

- run: npm ci
- run: npm run build

- id: changesets
uses: changesets/action@v1
with:
# The standard step is only to run `changeset version` but this does not update the
# package-lock.json file. So we also run `npm install`, which does this update.
# This is a workaround until this is handled automatically by `changeset version`.
# See https://github.com/changesets/changesets/issues/421.
version: npx changeset version && npm install
publish: npx changeset publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

prerelease:
if: ${{ github.event.workflow_run.conclusion == 'success' && github.repository_owner == 'cloudflare' }}
timeout-minutes: 5
runs-on: ubuntu-latest
environment: release

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 1

- uses: actions/setup-node@v4
with:
node-version: 24 # includes npm 11.5.1 or later, needed for trusted publishing
cache: "npm"

- run: npm ci

- name: Modify package.json version
run: npx tsx .github/version-script.ts

- run: npm run build

- run: npm publish --tag beta
30 changes: 16 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: Test
permissions:
contents: read

on:
push:
branches: [ main ]
branches: [main]
pull_request:
branches: [ main ]
branches: [main]

jobs:
test:
Expand All @@ -14,19 +16,19 @@ jobs:
options: --user 1001

steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "22"
cache: "npm"

- name: Install dependencies
run: npm ci
- name: Install dependencies
run: npm ci

- name: Build project
run: npm run build
- name: Build project
run: npm run build

- name: Run tests
run: npm test
- name: Run tests
run: npm test
Loading
Loading