Skip to content

Commit 0b55cde

Browse files
authored
chore: introduce changesets (#2740)
1 parent 1b63454 commit 0b55cde

File tree

4 files changed

+65
-2
lines changed

4 files changed

+65
-2
lines changed

.changeset/README.md

+8
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

+15
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": "vuejs/eslint-plugin-vue"
7+
}
8+
],
9+
"commit": false,
10+
"linked": [],
11+
"access": "public",
12+
"baseBranch": "master",
13+
"bumpVersionsWithWorkspaceProtocolOnly": true,
14+
"ignore": []
15+
}

.github/workflows/Release.yml

+35
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 == 'vuejs/eslint-plugin-vue'
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

+7-2
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,15 @@
1818
"lint:fix": "eslint . --fix && markdownlint \"**/*.md\" --fix",
1919
"tsc": "tsc",
2020
"preversion": "npm test && git add .",
21-
"version": "env-cmd -e version npm run update && npm run lint -- --fix && git add .",
21+
"version": "npm run generate:version && git add .",
2222
"update": "node ./tools/update.js",
2323
"update-resources": "node ./tools/update-resources.js",
2424
"docs:watch": "vitepress dev docs",
2525
"predocs:build": "npm run update",
26-
"docs:build": "vitepress build docs"
26+
"docs:build": "vitepress build docs",
27+
"generate:version": "env-cmd -e version npm run update && npm run lint -- --fix",
28+
"changeset:version": "changeset version && npm run generate:version && git add --all",
29+
"changeset:publish": "changeset publish"
2730
},
2831
"files": [
2932
"lib"
@@ -66,8 +69,10 @@
6669
"xml-name-validator": "^4.0.0"
6770
},
6871
"devDependencies": {
72+
"@changesets/cli": "^2.29.2",
6973
"@ota-meshi/site-kit-eslint-editor-vue": "^0.2.4",
7074
"@stylistic/eslint-plugin": "^2.12.1",
75+
"@svitejs/changesets-changelog-github-compact": "^1.2.0",
7176
"@types/eslint": "^8.56.2",
7277
"@types/natural-compare": "^1.4.3",
7378
"@types/node": "^14.18.63",

0 commit comments

Comments
 (0)