-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a6c226
commit 245b2e2
Showing
5 changed files
with
93 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -110,8 +110,9 @@ void GenerateReleaseWorkflow(Component component) | |
workflow.On | ||
.WorkflowDispatch() | ||
.Inputs( | ||
new StringInput("version", "Version in format X.Y.Z or X.Y.Z-preview.", true, "0.0.0") | ||
, new StringInput("target-branch", "(Optional) the name of the branch to release from", false, "main")); | ||
new StringInput("version", "Version in format X.Y.Z or X.Y.Z-preview.", true, "0.0.0"), | ||
new StringInput("branch", "(Optional) the name of the branch to release from", false, "main"), | ||
new BooleanInput("remove-tag-if-exists", "If set, will remove the existing tag. Use this if you have issues with the previous release action", false, false)); | ||
|
||
workflow.EnvDefaults(); | ||
|
||
|
@@ -132,11 +133,26 @@ void GenerateReleaseWorkflow(Component component) | |
|
||
tagJob.StepSetupDotNet(); | ||
|
||
|
||
tagJob.Step() | ||
.Name("Git Config") | ||
.Run(@"git config --global user.email ""[email protected]"" | ||
git config --global user.name ""Duende Software GitHub Bot"""); | ||
|
||
tagJob.Step() | ||
.Name("Remove previous git tag") | ||
.If("github.event.inputs['remove-tag']") | ||
.Run($@"if git rev-parse {component.TagPrefix}-{contexts.Event.Input.Version} >/dev/null 2>&1; then | ||
git tag -d {component.TagPrefix}-{contexts.Event.Input.Version} | ||
git push --delete origin {component.TagPrefix}-{contexts.Event.Input.Version} | ||
else | ||
echo 'Tag {component.TagPrefix}-{contexts.Event.Input.Version} does not exist.' | ||
fi"); | ||
|
||
|
||
tagJob.Step() | ||
.Name("Git tag") | ||
.Run($@"git config --global user.email ""[email protected]"" | ||
git config --global user.name ""Duende Software GitHub Bot"" | ||
git tag -a {component.TagPrefix}-{contexts.Event.Input.Version} -m ""Release v{contexts.Event.Input.Version}"" | ||
.Run($@"git tag -a {component.TagPrefix}-{contexts.Event.Input.Version} -m ""Release v{contexts.Event.Input.Version}"" | ||
git push origin {component.TagPrefix}-{contexts.Event.Input.Version}"); | ||
|
||
foreach (var project in component.Projects) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,16 @@ on: | |
type: string | ||
required: true | ||
default: '0.0.0' | ||
target-branch: | ||
branch: | ||
description: '(Optional) the name of the branch to release from' | ||
type: string | ||
required: false | ||
default: 'main' | ||
remove-tag-if-exists: | ||
description: 'If set, will remove the existing tag. Use this if you have issues with the previous release action' | ||
type: boolean | ||
required: false | ||
default: false | ||
env: | ||
DOTNET_NOLOGO: true | ||
DOTNET_CLI_TELEMETRY_OPTOUT: true | ||
|
@@ -43,10 +48,21 @@ jobs: | |
6.0.x | ||
8.0.x | ||
9.0.x | ||
- name: Git tag | ||
- name: Git Config | ||
run: |- | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Duende Software GitHub Bot" | ||
- name: Remove previous git tag | ||
if: github.event.inputs['remove-tag'] | ||
run: |- | ||
if git rev-parse atm-${{ github.event.inputs.version }} >/dev/null 2>&1; then | ||
git tag -d atm-${{ github.event.inputs.version }} | ||
git push --delete origin atm-${{ github.event.inputs.version }} | ||
else | ||
echo 'Tag atm-${{ github.event.inputs.version }} does not exist.' | ||
fi | ||
- name: Git tag | ||
run: |- | ||
git tag -a atm-${{ github.event.inputs.version }} -m "Release v${{ github.event.inputs.version }}" | ||
git push origin atm-${{ github.event.inputs.version }} | ||
- name: Pack AccessTokenManagement | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,16 @@ on: | |
type: string | ||
required: true | ||
default: '0.0.0' | ||
target-branch: | ||
branch: | ||
description: '(Optional) the name of the branch to release from' | ||
type: string | ||
required: false | ||
default: 'main' | ||
remove-tag-if-exists: | ||
description: 'If set, will remove the existing tag. Use this if you have issues with the previous release action' | ||
type: boolean | ||
required: false | ||
default: false | ||
env: | ||
DOTNET_NOLOGO: true | ||
DOTNET_CLI_TELEMETRY_OPTOUT: true | ||
|
@@ -43,10 +48,21 @@ jobs: | |
6.0.x | ||
8.0.x | ||
9.0.x | ||
- name: Git tag | ||
- name: Git Config | ||
run: |- | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Duende Software GitHub Bot" | ||
- name: Remove previous git tag | ||
if: github.event.inputs['remove-tag'] | ||
run: |- | ||
if git rev-parse imoc-${{ github.event.inputs.version }} >/dev/null 2>&1; then | ||
git tag -d imoc-${{ github.event.inputs.version }} | ||
git push --delete origin imoc-${{ github.event.inputs.version }} | ||
else | ||
echo 'Tag imoc-${{ github.event.inputs.version }} does not exist.' | ||
fi | ||
- name: Git tag | ||
run: |- | ||
git tag -a imoc-${{ github.event.inputs.version }} -m "Release v${{ github.event.inputs.version }}" | ||
git push origin imoc-${{ github.event.inputs.version }} | ||
- name: Pack IdentityModel.OidcClient | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,16 @@ on: | |
type: string | ||
required: true | ||
default: '0.0.0' | ||
target-branch: | ||
branch: | ||
description: '(Optional) the name of the branch to release from' | ||
type: string | ||
required: false | ||
default: 'main' | ||
remove-tag-if-exists: | ||
description: 'If set, will remove the existing tag. Use this if you have issues with the previous release action' | ||
type: boolean | ||
required: false | ||
default: false | ||
env: | ||
DOTNET_NOLOGO: true | ||
DOTNET_CLI_TELEMETRY_OPTOUT: true | ||
|
@@ -43,10 +48,21 @@ jobs: | |
6.0.x | ||
8.0.x | ||
9.0.x | ||
- name: Git tag | ||
- name: Git Config | ||
run: |- | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Duende Software GitHub Bot" | ||
- name: Remove previous git tag | ||
if: github.event.inputs['remove-tag'] | ||
run: |- | ||
if git rev-parse im-${{ github.event.inputs.version }} >/dev/null 2>&1; then | ||
git tag -d im-${{ github.event.inputs.version }} | ||
git push --delete origin im-${{ github.event.inputs.version }} | ||
else | ||
echo 'Tag im-${{ github.event.inputs.version }} does not exist.' | ||
fi | ||
- name: Git tag | ||
run: |- | ||
git tag -a im-${{ github.event.inputs.version }} -m "Release v${{ github.event.inputs.version }}" | ||
git push origin im-${{ github.event.inputs.version }} | ||
- name: Pack IdentityModel | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,11 +9,16 @@ on: | |
type: string | ||
required: true | ||
default: '0.0.0' | ||
target-branch: | ||
branch: | ||
description: '(Optional) the name of the branch to release from' | ||
type: string | ||
required: false | ||
default: 'main' | ||
remove-tag-if-exists: | ||
description: 'If set, will remove the existing tag. Use this if you have issues with the previous release action' | ||
type: boolean | ||
required: false | ||
default: false | ||
env: | ||
DOTNET_NOLOGO: true | ||
DOTNET_CLI_TELEMETRY_OPTOUT: true | ||
|
@@ -43,10 +48,21 @@ jobs: | |
6.0.x | ||
8.0.x | ||
9.0.x | ||
- name: Git tag | ||
- name: Git Config | ||
run: |- | ||
git config --global user.email "[email protected]" | ||
git config --global user.name "Duende Software GitHub Bot" | ||
- name: Remove previous git tag | ||
if: github.event.inputs['remove-tag'] | ||
run: |- | ||
if git rev-parse it-${{ github.event.inputs.version }} >/dev/null 2>&1; then | ||
git tag -d it-${{ github.event.inputs.version }} | ||
git push --delete origin it-${{ github.event.inputs.version }} | ||
else | ||
echo 'Tag it-${{ github.event.inputs.version }} does not exist.' | ||
fi | ||
- name: Git tag | ||
run: |- | ||
git tag -a it-${{ github.event.inputs.version }} -m "Release v${{ github.event.inputs.version }}" | ||
git push origin it-${{ github.event.inputs.version }} | ||
- name: Pack IgnoreThis | ||
|