Skip to content

Commit

Permalink
chore: support semver tags
Browse files Browse the repository at this point in the history
  • Loading branch information
corymhall committed Dec 10, 2023
1 parent 26cd615 commit 87a7254
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 14 deletions.
28 changes: 15 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,21 +53,23 @@ jobs:
role-to-assume: arn:aws:iam::1234567891012:role/cdk_github_actions
role-session-name: github
- name: Diff
uses: corymhall/cdk-diff-action@v1.0.0
uses: corymhall/cdk-diff-action@v1
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
```
You can also use the `v1-beta` branch to keep up to date.
This action supports semver versioning.
For example, to get the latest `v1.x.x` version.

```yml
jobs:
Synth:
steps:
- name: Diff
uses: corymhall/cdk-diff-action@v1-beta
with:
githubToken: ${{ secrets.GITHUB_TOKEN }}
uses: corymhall/cdk-diff-action@v1
```

Or to get the latest `v1.1.x` version.

```yml
uses: corymhall/[email protected]
```

### Allow Destroy Types
Expand All @@ -80,7 +82,7 @@ jobs:
Synth:
steps:
- name: Diff
uses: corymhall/cdk-diff-action@v1-beta
uses: corymhall/cdk-diff-action@v1
with:
allowedDestroyTypes: "AWS::ECS::TaskDefinition,AWS::CloudWatch::Dashboard"
githubToken: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -96,7 +98,7 @@ jobs:
Synth:
steps:
- name: Diff
uses: corymhall/cdk-diff-action@v1-beta
uses: corymhall/cdk-diff-action@v1
with:
noDiffForStages: "Stage1,Stage2"
githubToken: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -112,7 +114,7 @@ jobs:
Synth:
steps:
- name: Diff
uses: corymhall/cdk-diff-action@v1-beta
uses: corymhall/cdk-diff-action@v1
with:
noFailOnDestructiveChanges: "Stage1,Stage2"
githubToken: ${{ secrets.GITHUB_TOKEN }}
Expand All @@ -128,7 +130,7 @@ jobs:
Synth:
steps:
- name: Diff
uses: corymhall/cdk-diff-action@v1-beta
uses: corymhall/cdk-diff-action@v1
with:
failOnDestructiveChanges: false
githubToken: ${{ secrets.GITHUB_TOKEN }}
Expand Down
7 changes: 6 additions & 1 deletion projenrc/release-version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ export interface BumpOptions {
*/
readonly githubRepo: string;

/**
* If this is true, then commands will be printed and not executed
*
* @default false
*/
readonly dryRun: boolean;
}

Expand All @@ -45,7 +50,7 @@ export async function release(cwd: string, options: BumpOptions) {
const [majorVersion, minorVersion] = tagVersion.split('.');

const cmds = [
// `gh release create ${tagVersion} -R ${options.githubRepo} -F dist/changelog.md -t ${tagVersion} --target ${options.githubRef}`,
`gh release create ${tagVersion} -R ${options.githubRepo} -F dist/changelog.md -t ${tagVersion} --target ${options.githubRef}`,
tagCmd(options.githubRepo, majorVersion, cwd),
tagCmd(options.githubRepo, `${majorVersion}.${minorVersion}`, cwd),
];
Expand Down

0 comments on commit 87a7254

Please sign in to comment.