Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ci/configure gulp for ci #13

Merged
merged 5 commits into from
Sep 8, 2024
Merged
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
13 changes: 8 additions & 5 deletions packages/ci/gulp/prepublish.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,15 @@ const commitPath = ".";
const changeLogFile = "CHANGELOG.md";
// print output of commands into the terminal
const stdio = "inherit";
const commitsConfig = { path: commitPath, ignore: /^chore: release/ };

async function bumpVersion(preset) {
const bumper = new RestrictEmptyCommits(process.cwd())
.loadPreset(preset)
.tag({
prefix: tagPrefix,
})
.commits({ path: commitPath });
.commits(commitsConfig);

const recommendation = await bumper.bump();

Expand All @@ -46,7 +47,7 @@ async function changelog(preset, version) {
tagPrefix,
},
undefined,
{ path: commitPath },
commitsConfig,
);

const combinedStream = combineStreams(
Expand All @@ -70,11 +71,13 @@ async function commitTagPush(version) {
await execa("git", ["push", "--follow-tags"], { stdio });
}

async function githubRelease() {
async function githubRelease(preset) {
await new Promise((resolve, reject) => {
conventionalGithubReleaser(
{ type: "oauth", token: process.env.GITHUB_TOKEN },
{ preset, tagPrefix, commitPath },
{ config: preset, tagPrefix },
undefined,
commitsConfig,
(err, success) => {
if (err) {
reject(err);
Expand All @@ -96,5 +99,5 @@ task("ci:prepublish", async () => {

await changelog(preset, version);
await commitTagPush(version);
await githubRelease();
await githubRelease(preset);
});