-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bb8e596
commit 2205af6
Showing
3 changed files
with
70 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
// ORIGINALLY FROM CLOUDFLARE WRANGLER: | ||
// https://github.com/cloudflare/wrangler2/blob/main/.github/changeset-version.js | ||
|
||
import { exec } from "child_process"; | ||
// This script is used by the `release.yml` workflow to update the version of the packages being released. | ||
// 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. | ||
exec("npx changeset version"); | ||
exec("npm install"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
name: CI | ||
on: | ||
push: | ||
branches: | ||
- "**" | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: oven-sh/setup-bun@v2 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18.x | ||
cache: "bun" | ||
|
||
- run: bun install --no-frozen-lockfile | ||
- run: bun run build |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
name: Publish | ||
on: | ||
workflow_run: | ||
workflows: ["CI"] | ||
types: | ||
- completed | ||
branches: | ||
- main | ||
|
||
concurrency: ${{ github.workflow }}-${{ github.ref }} | ||
|
||
jobs: | ||
publish: | ||
if: ${{ github.event.workflow_run.conclusion == 'success' }} | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: oven-sh/setup-bun@v2 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 18.x | ||
cache: "bun" | ||
|
||
- name: Install bun Dependencies | ||
run: bun install --no-frozen-lockfile | ||
|
||
- name: Build the package | ||
run: bun build | ||
|
||
- name: Create Release Pull Request or Publish | ||
id: changesets | ||
uses: changesets/action@v1 | ||
with: | ||
commit: "chore(release): version packages" | ||
title: "chore(release): version packages" | ||
version: node .github/changeset-version.mjs | ||
publish: npx changeset publish | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |