Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
25 changes: 25 additions & 0 deletions .github/workflows/pkg-pr-new.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: Publish to pkg.pr.new for pre-release

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
80 changes: 80 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
name: Release

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

jobs:
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)

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: 22
cache: "npm"

# Ensure npm 11.5.1 or later is installed, to use trusted publishing.
# See: https://docs.npmjs.com/trusted-publishers
- name: Update npm
run: npm install -g npm@latest

- 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: 22
cache: "npm"

# Ensure npm 11.5.1 or later is installed, to use trusted publishing.
# See: https://docs.npmjs.com/trusted-publishers
- name: Update npm
run: npm install -g npm@latest

- run: npm ci

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

- run: npm run build

- run: npm publish --tag beta
28 changes: 14 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Test

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

jobs:
test:
Expand All @@ -14,19 +14,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