1
0
mirror of https://github.com/ianstormtaylor/slate.git synced 2025-09-02 03:32:36 +02:00
Files
slate/.github/workflows/comment.yml
Dylan Schiemann c4c14882ed Update dependencies to React 18, Node 20, TS 5.2, etc. (#5528)
* incremental upgrade to React 18, TS 4.9, etc.

* update yarn config

* fix build

* minor cleanup in type definitions

* incremental updates for TS 5.0

* fix build

* upgrade to typescript 5.2

* update dependencies

* fix lint issues

* update to latest Playwright version

* update changesets dep

* update emotion/css

* incremental dependency updates

* more small dependency updates

* upgrade prettier and eslint

* fix lint issues

* update dependencies rollup

* fix @types/node resolution to restore linting

* update tiny-invariant dependency

* update dependencies

* update dependencies lerna

* upgrade react-router-dom

* update @types/react and @types/node

* update babel dependencies

* udpate simple-git-hooks

* update @types/node resolution

* update lint-staged

* remove cypress from dependency list

* update @types/node to support Node 20

* update workflows to Node 20

* set resolutions for @types/react

* downgrade @types/react to 18.2.28

* update mocha

* update rimraf

* update @types/js-dom

* remove .lintstagedrc.js

* upgrade next to latest

* v0.61.4

* update lerna

* update faker and rollup

* update immer

* fix yarn clean command

* attempt to fix integration tests

* attempt to stabilize integration tests

* wip fix integration tests

* skip unstable integration test

* Add changeset

---------

Co-authored-by: Dalibor Tosic <dalibortosic00@gmail.com>
Co-authored-by: Nikola <nikolabijelic14@gmail.com>
2023-10-20 08:34:24 -07:00

90 lines
2.6 KiB
YAML

# https://github.com/marketplace/actions/automatic-rebase (https://github.com/cirrus-actions/rebase)
name: Comment
on:
issue_comment:
types:
- created
permissions:
contents: read # to fetch code (actions/checkout)
pull-requests: read # to get info about PR (cirrus-actions/rebase)
jobs:
rebase:
permissions:
contents: write # to push code to rebase (cirrus-actions/rebase)
pull-requests: read # to get info about PR (cirrus-actions/rebase)
name: rebase
runs-on: ubuntu-latest
if: |
github.event.issue.pull_request &&
startsWith(github.event.comment.body, '/rebase')
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Rebase PR
uses: cirrus-actions/rebase@1.3.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
release_next:
permissions:
contents: read # to fetch code (actions/checkout)
pull-requests: write # to create or update comment (peter-evans/create-or-update-comment)
name: release:next
runs-on: ubuntu-latest
if: |
github.event.issue.pull_request &&
github.event.sender.login == 'ianstormtaylor' &&
startsWith(github.event.comment.body, '/release:next')
steps:
- name: Checkout repo
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Checkout pull request
run: hub pr checkout ${{ github.event.issue.number }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: 20.x
cache: yarn
registry-url: https://registry.npmjs.org
key: node20
- name: Install dependencies
run: yarn
- name: Prepare release
run: yarn prerelease
# https://github.com/atlassian/changesets/blob/master/docs/snapshot-releases.md
- name: Release to @pr channel
run: |
yarn changeset version --snapshot
yarn changeset publish --tag pr
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Get released version
id: version
run: echo ::set-output name=version::$(node -p "require('./packages/slate/package.json').version")
- name: Create comment
uses: peter-evans/create-or-update-comment@v1
with:
issue-number: ${{ github.event.issue.number }}
body: |
A new release has been made for this pull request. You can install it with `yarn add slate@${{ steps.version.outputs.version }}`.