You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.4 KiB

name: automerge
on:
pull_request:
types:
- labeled
- unlabeled
- synchronize
- opened
- edited
- ready_for_review
- reopened
- unlocked
pull_request_review:
types:
- submitted
check_suite:
types:
- completed
status: {}
jobs:
automerge:
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎
uses: actions/checkout@v3
- name: merge
uses: mtanzi/action-automerge@v1
id: merge
with:
github_token: ${{ github.GITHUB_TOKEN}}
source: 'imgbot'
target: 'main'
- name: autopublish
uses: actions/setup-node@v1
with:
node-version: "12.x"
registry-url: https://registry.npmjs.org/
- run: npm version patch
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.npm_token}}
- name: commit
id: commit
run: |
git config --global user.email aisuru@foxmail.com
git config --global user.name action_bot
git add .
git commit -m "update npm version"
continue-on-error: true
- name: Check on failures
if: steps.commit.outputs.status == 'failure'
run: exit 1
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}