2022-12-29 14:52:43 +08:00
name : Changesets
on :
push :
branches :
- master
pull_request :
concurrency :
group : ${{ github.workflow }}-${{ github.ref }}
jobs :
changesets :
2022-12-30 13:49:00 +08:00
strategy :
matrix :
group : [ core, toolkit]
2022-12-29 14:52:43 +08:00
runs-on : ubuntu-latest
steps :
- uses : actions/checkout@v3
with :
token : ${{ secrets.BOT_PAT }}
- name : Setup Node and pnpm
uses : silverhand-io/actions-node-pnpm-run-steps@v2
- name : Import GPG key
uses : crazy-max/ghaction-import-gpg@v5
with :
gpg_private_key : ${{ secrets.BOT_GPG_KEY }}
passphrase : ${{ secrets.BOT_GPG_PASSPHRASE }}
git_user_signingkey : true
git_commit_gpgsign : true
git_tag_gpgsign : true
- name : Configure Git user
run : |
git config --global user.email bot@silverhand.io
git config --global user.name silverhand-bot
- name : Version packages
run : |
2022-12-30 13:49:00 +08:00
node .scripts/version.js ${{ matrix.group }}
2022-12-29 14:52:43 +08:00
pnpm i --no-frozen-lockfile
git status
- name : Create pull request
if : github.event_name == 'push'
uses : peter-evans/create-pull-request@v4
with :
token : ${{ secrets.BOT_PAT }}
2022-12-30 13:49:00 +08:00
commit-message: 'release : version ${{ matrix.group }} packages'
2022-12-29 14:52:43 +08:00
committer : silverhand-bot <bot@silverhand.io>
author : silverhand-bot <bot@silverhand.io>
base : master
2022-12-30 13:49:00 +08:00
branch : release/version-${{ matrix.group }}-packages
title: 'release : version ${{ matrix.group }} packages'
body : 'This is an automatic pull request from the result of `node .scripts/version.js ${{ matrix.group }}` command. Merge it will trigger the publish flow for versioned packages.'