Skip to content
Source
Sign inSign up
TanStack/cli
Open History to see the last commit

release-commit-and-push.mjs

19 lines555 Bytes

1import { execSync } from 'node:child_process'
2​
3function run(command) {
4 return execSync(command, { encoding: 'utf8' }).trim()
5}
6​
7function main() {
8 const branch = process.env.GITHUB_REF_NAME || run('git branch --show-current')
9​
10 run('git add -A')
11 run(
12 `git -c user.name='github-actions[bot]' -c user.email='41898282+github-actions[bot]@users.noreply.github.com' commit -m "ci: Version Packages [skip ci]"`,
13 )
14 run(`git push --follow-tags origin "HEAD:${branch}"`)
15​
16 console.log(`Committed and pushed release changes to ${branch}.`)
18​
19main()