Skip to content

Commit

Permalink
Merge pull request #22 from nkdAgility/topic/update-title
Browse files Browse the repository at this point in the history
Update the build and GitVersion numbers to resolve the Reelase issue
  • Loading branch information
MrHinsh authored Jul 1, 2024
2 parents 1f76227 + 335b7d1 commit e1712ab
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 29 deletions.
37 changes: 12 additions & 25 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,28 +21,12 @@ jobs:
uses: gittools/actions/gitversion/setup@v1.1.1
with:
versionSpec: '5.x'
includePrerelease: true
- name: Execute GitVersion
id: gitversion
uses: gittools/actions/gitversion/execute@v1.1.1
with:
useConfigFile: true
- run: |
If (("Preview", "") -notcontains "${{ steps.gitversion.outputs.GitVersion_PreReleaseLabel }}") {
write-output " The GitVersion_PreReleaseLabel is invlaid!"
exit 1
}
else {
write-output " The GitVersion_PreReleaseLabel is valid, lets check the branch!"
if (("${{ steps.gitversion.outputs.GitVersion_BranchName }}").StartsWith("release")) {
write-output "Branch Bad!"
exit 2
}
else {
write-output "Branch Good!"
}
}
shell: pwsh
build:
runs-on: ubuntu-latest
needs: Setup
Expand Down Expand Up @@ -74,24 +58,27 @@ jobs:
release:
runs-on: ubuntu-latest
needs: [build, Setup]
if: ${{ success() && ( needs.Setup.outputs.GitVersion_PreReleaseLabel == 'Preview' || needs.Setup.outputs.GitVersion_PreReleaseLabel == '' ) }}
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: AzureDevOpsWorkItemClone
- name: "Release WorkItemClone"
run: |
echo "GitVersion_BranchName: ${{needs.Setup.outputs.GitVersion_BranchName}}"
echo "GitVersion_SemVer: ${{needs.Setup.outputs.GitVersion_SemVer}}"
echo "GitVersion_PreReleaseLabel: ${{needs.Setup.outputs.GitVersion_PreReleaseLabel}}"
if ( "${{needs.Setup.outputs.GitVersion_PreReleaseLabel}}" -eq "Preview" ) {
echo "Creating a prerelease release."
echo "GitVersion_BranchName: ${{needs.Setup.outputs.GitVersion_BranchName}}"
echo "GitVersion_SemVer: ${{needs.Setup.outputs.GitVersion_SemVer}}"
echo "GitVersion_PreReleaseLabel: ${{needs.Setup.outputs.GitVersion_PreReleaseLabel}}"
if ( "${{needs.Setup.outputs.GitVersion_PreReleaseLabel}}" -eq "Preview" ) {
echo "Creating a prerelease release."
gh release create v${{needs.Setup.outputs.GitVersion_SemVer}} ./AzureDevOpsWorkItemClone-v${{needs.Setup.outputs.GitVersion_SemVer}}-win-x64.zip --generate-notes --prerelease
}
else {
exit 0
}
if ( "${{needs.Setup.outputs.GitVersion_PreReleaseLabel}}" -eq "" ) {
echo "Creating a release."
gh release create v${{needs.Setup.outputs.GitVersion_SemVer}} ./AzureDevOpsWorkItemClone-v${{needs.Setup.outputs.GitVersion_SemVer}}-win-x64.zip --generate-notes --discussion-category "General"
}
exit 0
}
shell: pwsh
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
17 changes: 14 additions & 3 deletions GitVersion.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,16 +12,27 @@ branches:
tracks-release-branches: true
regex: ^master$|^main$
release:
mode: ContinuousDelivery
mode: ContinuousDeployment
tag: ""
increment: Patch
track-merge-target: false
regex: ^releases?[/-]v?(\d+\.\d+.\d+)$
regex: ^releases?[\/]v?(\d+\.\d+.\d+)$
source-branches:
- master
- main
is-release-branch: true
is-mainline: false
topic:
mode: ContinuousDelivery
tag: useBranchName
increment: Patch
track-merge-target: false
regex: ^topic?[\/]v?(\d+\.\d+.\d+)$
source-branches:
- master
- main
is-release-branch: false
is-mainline: false
ignore:
sha: []
merge-message-formats: {}
merge-message-formats: {}
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
# abb-workitem-clone
![Azure-DevOps-WorkItem-Clone](https://socialify.git.ci/nkdAgility/Azure-DevOps-WorkItem-Clone/image?description=1&descriptionEditable=Clone%20Work%20Items%20under%20Parent%20bassed%20on%20JSON%20and%20Template&forks=1&language=1&name=1&owner=1&pattern=Signal&stargazers=1&theme=Light)
# Azure DevOps WorkItem Clone


## Commands
Expand Down

0 comments on commit e1712ab

Please sign in to comment.