Skip to content

Commit f7a9733

Browse files
authored
chore: introduce changesets (#263)
1 parent 012956e commit f7a9733

File tree

5 files changed

+65
-28
lines changed

5 files changed

+65
-28
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: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"$schema": "https://unpkg.com/@changesets/config/schema.json",
3+
"changelog": [
4+
"@svitejs/changesets-changelog-github-compact",
5+
{
6+
"repo": "eslint-community/eslint-plugin-es-x"
7+
}
8+
],
9+
"commit": false,
10+
"linked": [],
11+
"access": "public",
12+
"baseBranch": "master",
13+
"bumpVersionsWithWorkspaceProtocolOnly": true,
14+
"ignore": []
15+
}

.github/workflows/NpmPublish.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

.github/workflows/Release.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
permissions: {}
9+
10+
jobs:
11+
release:
12+
# prevents this action from running on forks
13+
if: github.repository == 'eslint-community/eslint-plugin-es-x'
14+
permissions:
15+
contents: write # to create release (changesets/action)
16+
pull-requests: write # to create pull request (changesets/action)
17+
name: Release
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout Repo
21+
uses: actions/checkout@v4
22+
- name: Setup Node.js
23+
uses: actions/setup-node@v4
24+
- name: Install Dependencies
25+
run: npm install -f
26+
27+
- name: Create Release Pull Request or Publish to npm
28+
id: changesets
29+
uses: changesets/action@v1
30+
with:
31+
version: npm run changeset:version
32+
publish: npm run changeset:publish
33+
env:
34+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
35+
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

package.json

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@
1818
"eslint-compat-utils": "^0.6.3"
1919
},
2020
"devDependencies": {
21+
"@changesets/cli": "^2.29.2",
2122
"@clack/prompts": "^0.11.0",
23+
"@svitejs/changesets-changelog-github-compact": "^1.2.0",
2224
"@typescript-eslint/parser": "^8.0.0",
2325
"env-cmd": "^10.1.0",
2426
"eslint": "^9.1.0",
@@ -64,9 +66,12 @@
6466
"update:config-docs": "node scripts/update-docs-configs",
6567
"resource-update:unicode-properties": "node scripts/update-unicode-properties",
6668
"preversion": "npm test",
67-
"version": "env-cmd -e version run-s update:* && git add .",
69+
"version": "npm run generate:version && git add .",
6870
"postversion": "git push && git push --tags",
69-
"watch": "mocha tests/**/*.{js,mjs} --reporter progress --watch --growl"
71+
"watch": "mocha tests/**/*.{js,mjs} --reporter progress --watch --growl",
72+
"generate:version": "env-cmd -e version run-s update:*",
73+
"changeset:version": "changeset version && npm run generate:version && git add --all",
74+
"changeset:publish": "changeset publish"
7075
},
7176
"repository": {
7277
"type": "git",

0 commit comments

Comments
 (0)