1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-08-27 17:09:53 +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:
Ian Storm Taylor
2021-03-31 13:14:40 -04:00
committed by GitHub
parent a8187e226e
commit 7283c51feb
9 changed files with 856 additions and 29 deletions

36
.github/workflows/auto-release-dev.yml vendored Normal file
View 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 }}

View 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 }}

View File

@@ -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