Skip to content

Commit

Permalink
chore: automatically release every monday
Browse files Browse the repository at this point in the history
  • Loading branch information
RomainMuller committed Mar 28, 2023
1 parent 68837a4 commit 35acaf9
Show file tree
Hide file tree
Showing 7 changed files with 81 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitattributes

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

59 changes: 59 additions & 0 deletions .github/workflows/auto-tag-dev.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 4 additions & 4 deletions .github/workflows/auto-tag-releases.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .gitignore

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions .projen/files.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 10 additions & 5 deletions .projenrc.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,10 +213,15 @@ new JsiiCalcFixtures(project);
new BuildWorkflow(project);

// Add the custom release workflow
new ReleaseWorkflow(project).autoTag({
preReleaseId: 'dev',
runName: 'Auto-Tag Prerelease (default branch)',
schedule: '0 0 * * *',
});
new ReleaseWorkflow(project)
.autoTag({
preReleaseId: 'dev',
runName: 'Auto-Tag Prerelease (default branch)',
schedule: '0 0 * * 0,2-6', // Tuesday though sundays at midnight
})
.autoTag({
runName: 'Auto-Tag Release (default branch)',
schedule: '0 0 * * 1', // Mondays at midnight
});

project.synth();
6 changes: 5 additions & 1 deletion projenrc/release.ts
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,11 @@ export class ReleaseWorkflow {
}

public autoTag(opts: AutoTagWorkflowProps): this {
new AutoTagWorkflow(this.project, `auto-tag-releases${opts.branch ? `-${opts.branch}` : ''}`, opts);
new AutoTagWorkflow(
this.project,
`auto-tag-${opts.preReleaseId ?? 'releases'}${opts.branch ? `-${opts.branch}` : ''}`,
opts,
);
return this;
}
}
Expand Down

0 comments on commit 35acaf9

Please sign in to comment.