Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ jobs:
path: packages

- run: npm run test:ci
- run: npm exec -- coveralls < .cache/coverage/lcov.info
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}

deploy-staging:
if: >
Expand Down
9 changes: 5 additions & 4 deletions utils/scripts/tag.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -83,20 +83,21 @@ const changelog = async (tag, spinner) => {
/**
* Push a GitHub release.
*
* @param {String} main Name for the main branch being released.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[nit]

Suggested change
* @param {String} main Name for the main branch being released.
* @param {String} defaultBranch Name for the default branch being released.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually maybe branch rather than defaultBranch might more suitable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Never mind. The version script uses main too. It might be better to keep as is for consistency.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

am i misinterpreting the argument or is main the name of the actual branch, or is it just whichever branch is provided to the script? 🤔

* @param {String} tag The tag for the new release.
* @param {String} markdown Markdown content.
* @param {Ora} spinner Terminal spinner.
*
* @returns The draft release URL.
*/
const release = async (tag, markdown, spinner) => {
const release = async (main, tag, markdown, spinner) => {
info('Creating release...', spinner);

const pushArgs = ['push', '--follow-tags', '--no-verify', '--atomic', 'origin'];

// Ensure `version` commit hits CI, triggering npm publish
await execa('git', pushArgs.concat('HEAD^:main'));
await execa('git', pushArgs.concat('main'));
await execa('git', pushArgs.concat(`HEAD^:${main}`));
await execa('git', pushArgs.concat(main));

const url = await githubRelease({ tag, body: markdown, spinner });

Expand Down Expand Up @@ -221,7 +222,7 @@ program
]);

if (prompt.release) {
await release(tag, markdown, spinner);
await release(program.opts().main, tag, markdown, spinner);
} else {
await rollback(tag, spinner);
}
Expand Down