Skip to content

Commit

Permalink
chore: create auto-pr action
Browse files Browse the repository at this point in the history
  • Loading branch information
NicoKam committed Mar 6, 2024
1 parent 0933772 commit 1321f5a
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 2 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/changesets-auto-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# This workflow will run changesets version and create PR to master

name: changesets-auto-pr

on:
workflow_dispatch:
push:
branches-ignore:
- master
paths:
- '.changeset/*'

jobs:
replace-package-json-and-publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
registry-url: https://registry.npmjs.org/
- name: install dependencies
run: |
npm i pnpm -g
pnpm i --no-frozen-lockfile
- name: changesets-version
id: changesets
uses: changesets/action@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Dingtalk Notify
uses: zcong1993/actions-ding@master
if: steps.changesets.outputs.hasChangesets == 'true'
with:
dingToken: ${{ secrets.DING_TALK_ACCESS_TOKEN }}
body: |
{
"msgtype": "markdown",
"markdown": {
"title":"orca-pocket PR 创建提示",
"text": "## Orca-Pocket PR 已创建\n 请查看[PR列表](https://github.com/orca-team/pocket/pulls)"
},
"at": {
"isAtAll": false
}
}
3 changes: 1 addition & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
# Install dependence and running `changesets publish`

name: Publish orca-pocket

Expand Down

0 comments on commit 1321f5a

Please sign in to comment.