Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit bece9f8

Browse files
authored
chore: Add changesets publish workflow (#22)
1 parent ca21705 commit bece9f8

File tree

7 files changed

+694
-9
lines changed

7 files changed

+694
-9
lines changed

.changeset/README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# Changesets
2+
3+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
4+
with multi-package repos, or single-package repos to help you version and publish your code. You can
5+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
6+
7+
We have a quick list of common questions to get you started engaging with this project in
8+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)

.changeset/config.json

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/[email protected]/schema.json",
3+
"changelog": "@changesets/cli/changelog",
4+
"commit": false,
5+
"fixed": [],
6+
"linked": [],
7+
"access": "restricted",
8+
"baseBranch": "main",
9+
"updateInternalDependencies": "patch",
10+
"ignore": []
11+
}

.changeset/khaki-timers-prove.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
---
2+
"@debugids/rolldown": minor
3+
"@debugids/browser": minor
4+
"@debugids/esbuild": minor
5+
"@debugids/webpack": minor
6+
"@debugids/common": minor
7+
"@debugids/parcel-optimizer-debugids": minor
8+
"@debugids/rollup": minor
9+
"@debugids/rspack": minor
10+
"@debugids/node": minor
11+
"@debugids/vite": minor
12+
"@debugids/cli": minor
13+
---
14+
15+
Initial Publish of Debug ID packages
16+
17+
This is an initial release of JavaScript polyfills, bundler plugins and utils
18+
for the [TC39 Debug ID
19+
proposal](https://github.com/tc39/source-map/blob/main/proposals/debug-id.md).

.github/workflows/prepare-publish.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Prepare Publish
2+
3+
on:
4+
workflow_dispatch:
5+
6+
concurrency: ${{ github.workflow }}-${{ github.ref }}
7+
8+
jobs:
9+
publish:
10+
name: Prepare Publish
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
15+
with:
16+
cache: yarn
17+
node-version-file: "package.json"
18+
- name: Install
19+
run: yarn install
20+
- name: Create Release Pull Request
21+
id: changesets
22+
uses: changesets/action@v1
23+
with:
24+
version: yarn changeset:consume
25+
commit: "meta(changelog): Update package versions"
26+
title: "meta(changelog): Update package versions"
27+
env:
28+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/publish.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Publish
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
paths:
8+
- "**/CHANGELOG.md"
9+
10+
concurrency: ${{ github.workflow }}-${{ github.ref }}
11+
12+
jobs:
13+
publish:
14+
name: Publish
15+
runs-on: ubuntu-latest
16+
if: |
17+
contains(github.event.head_commit.message, 'meta(changelog)')
18+
&& contains(github.event.head_commit.message, 'Update package versions')
19+
steps:
20+
- uses: actions/checkout@v4
21+
- uses: actions/setup-node@v4
22+
with:
23+
cache: yarn
24+
node-version-file: "package.json"
25+
- name: Install
26+
run: yarn install
27+
- name: Build
28+
run: yarn build
29+
- name: Publish to NPM
30+
uses: changesets/action@v1
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
34+
with:
35+
publish: pnpm changeset:publish
36+
createGithubReleases: true

package.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,14 @@
1010
"test:node": "turbo run test --filter=./test/node",
1111
"test:browser": "turbo run test --filter=./test/browser",
1212
"lint": "biome check",
13-
"fix": "biome check --write"
13+
"fix": "biome check --write",
14+
"changeset:add": "changeset",
15+
"changeset:consume": "changeset version",
16+
"changeset:publish": "changeset publish"
1417
},
1518
"devDependencies": {
1619
"@biomejs/biome": "1.9.3",
20+
"@changesets/cli": "^2.27.9",
1721
"@rollup/plugin-node-resolve": "^15.3.0",
1822
"@rollup/plugin-typescript": "^12.1.0",
1923
"@rspack/cli": "^1.0.8",

0 commit comments

Comments
 (0)