Skip to content

Commit cfdf75b

Browse files
committed
feat(release): use changesets instead of shipjs
1 parent c3f38ef commit cfdf75b

File tree

10 files changed

+772
-1437
lines changed

10 files changed

+772
-1437
lines changed

.changeset/README.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
# Changesets
2+
3+
このリポジトリは[Changesets](https://github.com/atlassian/changesets)を使ったリリース管理をしています。
4+
Pull Requestを出すと、`.changesets/UNIQUE_ID.md` に変更履歴を書くように要求されます。
5+
6+
changesetファイルには、次の形式で変更点を書いていきます。
7+
8+
既存のルールを更新するとき
9+
10+
```markdown
11+
---
12+
"textlint-rule-preset-ja-technical-writing": major
13+
---
14+
15+
:sparkles: [ルール名](https://example.com)をアップデート
16+
17+
変更点の解説
18+
19+
```
20+
21+
新しいルールを追加するとき
22+
23+
```markdown
24+
---
25+
"textlint-rule-preset-ja-technical-writing": major
26+
---
27+
28+
:new: [ルール名](https://example.com)を追加
29+
30+
追加したルールの解説
31+
32+
```
33+
34+
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
35+
with multi-package repos, or single-package repos to help you version and publish your code. You can
36+
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
37+
38+
We have a quick list of common questions to get you started engaging with this project in
39+
[our documentation](https://github.com/changesets/changesets/blob/main/docs/common-questions.md)
40+
41+

.changeset/config.json

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

.github/workflows/prepare-release.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Create ReleaseIssue
2+
on:
3+
schedule:
4+
# 1月/7月にリリース
5+
- cron: "0 0 1 */6 *"
6+
7+
jobs:
8+
create_issue:
9+
name: Create team sync issue
10+
runs-on: ubuntu-latest
11+
permissions:
12+
issues: write
13+
steps:
14+
- name: Create team sync issue
15+
uses: imjohnbo/issue-bot@v3.0
16+
with:
17+
assignees: "azu"
18+
title: "Next Release"
19+
body: |
20+
### 次のリリースの準備ができました
21+
22+
- [ ] マージ忘れのPRがないかを確認
23+
- [ ] Version PackagesのPRをマージ
24+
- [ ] 新しいバージョンがリリースされたことを確認
25+
26+
pinned: false
27+
close-previous: true
28+
env:
29+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/release.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release:
10+
name: Release
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout Repo
14+
uses: actions/checkout@v2
15+
with:
16+
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
17+
fetch-depth: 0
18+
- name: Setup Node.js
19+
uses: actions/setup-node@v2
20+
with:
21+
node-version: 14
22+
23+
- name: Install Dependencies
24+
run: yarn
25+
26+
- name: Create Release Pull Request or Publish to npm
27+
id: changesets
28+
uses: changesets/action@master
29+
with:
30+
publish: yarn run release
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
NPM_TOKEN: ${{ secrets.SHARED_BOT_NPM_TOKEN }}

.github/workflows/shipjs-manual-prepare.yml

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

.github/workflows/shipjs-schedule-prepare.yml

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

.github/workflows/shipjs-trigger.yml

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

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,10 +56,10 @@
5656
"textlint-rule-sentence-length": "^2.2.0"
5757
},
5858
"devDependencies": {
59+
"@changesets/cli": "^2.16.0",
5960
"markdown-toc": "^1.2.0",
6061
"mocha": "^9.0.1",
61-
"semver": "^7.3.5",
62-
"shipjs": "0.23.3"
62+
"semver": "^7.3.5"
6363
},
6464
"email": "azuciao@gmail.com"
6565
}

ship.config.js

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

0 commit comments

Comments
 (0)