Skip to content

Commit

Permalink
fix: use release hook
Browse files Browse the repository at this point in the history
  • Loading branch information
hyoban committed Feb 16, 2024
1 parent d5fec8f commit 38b80cd
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ const prompts = {
type: 'confirm',
message: context => `Are you sure you want to publish? (pnpm -r publish --access public --no-git-checks --tag ${context['index'].tag})`,
},
release: {
type: 'confirm',
message: 'Are you sure you want to create a new release on GitHub?',
},
}

const MANIFEST_PATH = './package.json'
Expand Down Expand Up @@ -200,8 +204,14 @@ class ReleaseItPnpmPlugin extends Plugin {
return this.getIncrementedVersion(options)
}

async publish() {
await this.exec('npx changelogithub')
async release() {
await this.step({
task: async () => {
await this.exec('npx changelogithub')
},
label: 'Creating release on GitHub',
prompt: 'release',
})
}
}

Expand Down

0 comments on commit 38b80cd

Please sign in to comment.