mirror of
https://github.com/ianstormtaylor/slate.git
synced 2025-08-17 04:34:00 +02:00
Add changesets (#4154)
* add first changesets integration * remove readme * readd readme * update auto-release workflow logic * update auto-release script order, fix prettier * change access to public * update release script * try to fix changesets * add experimental snapshot version config * try fixing * remove excess * switch auto-release branch to master * add release pull request workflow * add changeset todo to pr template * update changeset
This commit is contained in:
8
.changeset/README.md
Normal file
8
.changeset/README.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
# Changesets
|
||||||
|
|
||||||
|
Hello and welcome! This folder has been automatically generated by `@changesets/cli`, a build tool that works
|
||||||
|
with multi-package repos, or single-package repos to help you version and publish your code. You can
|
||||||
|
find the full documentation for it [in our repository](https://github.com/changesets/changesets)
|
||||||
|
|
||||||
|
We have a quick list of common questions to get you started engaging with this project in
|
||||||
|
[our documentation](https://github.com/changesets/changesets/blob/master/docs/common-questions.md)
|
13
.changeset/config.json
Normal file
13
.changeset/config.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"$schema": "https://unpkg.com/@changesets/config@1.5.0/schema.json",
|
||||||
|
"changelog": "@changesets/cli/changelog",
|
||||||
|
"commit": false,
|
||||||
|
"linked": [["slate", "slate-history", "slate-hyperscript", "slate-react"]],
|
||||||
|
"access": "public",
|
||||||
|
"baseBranch": "master",
|
||||||
|
"updateInternalDependencies": "patch",
|
||||||
|
"ignore": [],
|
||||||
|
"___experimentalUnsafeOptions_WILL_CHANGE_IN_PATCH": {
|
||||||
|
"useCalculatedVersionForSnapshots": true
|
||||||
|
}
|
||||||
|
}
|
8
.changeset/lovely-rats-suffer.md
Normal file
8
.changeset/lovely-rats-suffer.md
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
---
|
||||||
|
'slate': patch
|
||||||
|
'slate-history': patch
|
||||||
|
'slate-hyperscript': patch
|
||||||
|
'slate-react': patch
|
||||||
|
---
|
||||||
|
|
||||||
|
**Start using [🦋 Changesets](https://github.com/atlassian/changesets) to manage releases.** Going forward, whenever a pull request is made that fixes or adds functionality to Slate, it will need to be accompanied by a changset Markdown file describing the change. These files will be automatically used in the release process when bump the versions of Slate and compiling the changelog.
|
1
.github/PULL_REQUEST_TEMPLATE.md
vendored
1
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -15,4 +15,5 @@ If your change is non-trivial, please include a description of how the new logic
|
|||||||
- [ ] The tests pass with `yarn test`.
|
- [ ] The tests pass with `yarn test`.
|
||||||
- [ ] The linter passes with `yarn lint`. (Fix errors with `yarn fix`.)
|
- [ ] The linter passes with `yarn lint`. (Fix errors with `yarn fix`.)
|
||||||
- [ ] The relevant examples still work. (Run examples with `yarn start`.)
|
- [ ] The relevant examples still work. (Run examples with `yarn start`.)
|
||||||
|
- [ ] You've [added a changeset](https://github.com/atlassian/changesets/blob/master/docs/adding-a-changeset.md) if changing functionality. (Add one with `yarn changeset add`.)
|
||||||
|
|
||||||
|
36
.github/workflows/auto-release-dev.yml
vendored
Normal file
36
.github/workflows/auto-release-dev.yml
vendored
Normal file
@@ -0,0 +1,36 @@
|
|||||||
|
name: Auto-release @dev
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: Auto-release @dev
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@master
|
||||||
|
with:
|
||||||
|
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup node
|
||||||
|
uses: actions/setup-node@master
|
||||||
|
with:
|
||||||
|
node-version: 12.x
|
||||||
|
registry-url: https://registry.npmjs.org
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn
|
||||||
|
|
||||||
|
- name: Prepare release
|
||||||
|
run: yarn prerelease
|
||||||
|
|
||||||
|
- name: Release to @dev channel
|
||||||
|
run: |
|
||||||
|
yarn changeset version --snapshot
|
||||||
|
yarn changeset publish --tag dev
|
||||||
|
env:
|
||||||
|
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
|
38
.github/workflows/create-release-pull-request.yml
vendored
Normal file
38
.github/workflows/create-release-pull-request.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
name: Create release PR
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- master
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
release:
|
||||||
|
name: Create release PR
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@master
|
||||||
|
with:
|
||||||
|
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
|
||||||
|
fetch-depth: 0
|
||||||
|
|
||||||
|
- name: Setup node
|
||||||
|
uses: actions/setup-node@master
|
||||||
|
with:
|
||||||
|
node-version: 12.x
|
||||||
|
registry-url: https://registry.npmjs.org
|
||||||
|
|
||||||
|
- name: Install dependencies
|
||||||
|
run: yarn
|
||||||
|
|
||||||
|
- name: Prepare release
|
||||||
|
run: yarn prerelease
|
||||||
|
|
||||||
|
# https://github.com/changesets/action
|
||||||
|
- name: Create release pull request
|
||||||
|
uses: changesets/action@master
|
||||||
|
with:
|
||||||
|
publish: yarn changeset publish
|
||||||
|
env:
|
||||||
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
|
16
.github/workflows/release.yml
vendored
16
.github/workflows/release.yml
vendored
@@ -1,16 +0,0 @@
|
|||||||
name: Release
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
release:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- uses: actions/setup-node@v2
|
|
||||||
with:
|
|
||||||
node-version: '14'
|
|
||||||
- run: |
|
|
||||||
git config --global user.name 'Automation'
|
|
||||||
git config --global user.email 'ianstormtaylor@users.noreply.github.com'
|
|
||||||
yarn
|
|
||||||
yarn internal:release:next
|
|
||||||
|
|
@@ -23,7 +23,7 @@
|
|||||||
"release:latest": "yarn prerelease && lerna publish --force-publish",
|
"release:latest": "yarn prerelease && lerna publish --force-publish",
|
||||||
"release:next": "yarn prerelease && lerna publish --dist-tag next --force-publish",
|
"release:next": "yarn prerelease && lerna publish --dist-tag next --force-publish",
|
||||||
"release:experimental": "yarn prerelease && lerna publish --dist-tag experimental",
|
"release:experimental": "yarn prerelease && lerna publish --dist-tag experimental",
|
||||||
"internal:release:next": "yarn prerelease && lerna publish --dist-tag next --force-publish --conventional-commits --yes",
|
"internal:release:next": "yarn prerelease && yarn changeset publish --tag next",
|
||||||
"serve": "cd ./site && next",
|
"serve": "cd ./site && next",
|
||||||
"start": "npm-run-all --parallel --print-label watch serve",
|
"start": "npm-run-all --parallel --print-label watch serve",
|
||||||
"test": "mocha --require ./config/babel/register.cjs ./packages/*/test/index.js",
|
"test": "mocha --require ./config/babel/register.cjs ./packages/*/test/index.js",
|
||||||
@@ -45,6 +45,7 @@
|
|||||||
"@babel/preset-typescript": "^7.7.4",
|
"@babel/preset-typescript": "^7.7.4",
|
||||||
"@babel/register": "^7.7.4",
|
"@babel/register": "^7.7.4",
|
||||||
"@babel/runtime": "^7.7.4",
|
"@babel/runtime": "^7.7.4",
|
||||||
|
"@changesets/cli": "^2.14.1",
|
||||||
"@types/lodash": "^4.14.149",
|
"@types/lodash": "^4.14.149",
|
||||||
"@types/mocha": "^5.2.7",
|
"@types/mocha": "^5.2.7",
|
||||||
"@types/node": "^12.12.14",
|
"@types/node": "^12.12.14",
|
||||||
|
Reference in New Issue
Block a user