Skip to content

Commit

Permalink
chore: update release script
Browse files Browse the repository at this point in the history
  • Loading branch information
antfu committed May 10, 2021
1 parent 06fd6ae commit 3811d49
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 7 deletions.
3 changes: 1 addition & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,7 @@ name: Release

on:
push:
branches:
- main
tag: '*'

jobs:
release:
Expand Down
4 changes: 3 additions & 1 deletion scripts/prompt.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ if (!pkg)
process.exit(1)

cd(pkg.path)
await $`bumpp --push --commit "chore: release ${pkg.name} v"`
const msg = `chore: release ${pkg.name} v`
const tag = `${pkg.name}@v`
await $`bumpp --push --commit ${msg} --tag ${tag}`
8 changes: 4 additions & 4 deletions scripts/release.mjs → scripts/publish.mjs
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
// @ts-nocheck

import { $, cd } from 'zx'
import { getPackagePaths } from './packages.mjs'
import { getPackageInfo } from './packages.mjs'

for (const pkg of await getPackagePaths()) {
cd(pkg)
await $`pnpx conventional-changelog -p angular -i CHANGELOG.md -s --commit-path .`
for (const pkg of await getPackageInfo()) {
cd(pkg.path)
await $`pnpx conventional-changelog -p angular -i CHANGELOG.md -s --commit-path . --lerna-package ${pkg.name}`
}

await $`pnpm publish -r --access public --no-git-checks`

0 comments on commit 3811d49

Please sign in to comment.