Skip to content

Commit

Permalink
Update Ifv2
Browse files Browse the repository at this point in the history
  • Loading branch information
MrHinsh committed Jul 1, 2024
1 parent 89fb7bd commit 335b7d1
Showing 1 changed file with 11 additions and 9 deletions.
20 changes: 11 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,25 +58,27 @@ jobs:
release:
runs-on: ubuntu-latest
needs: [build, Setup]
if: (("${{needs.Setup.outputs.GitVersion_PreReleaseLabel}}" == "Preview") || ("${{needs.Setup.outputs.GitVersion_PreReleaseLabel}}" == ""))
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
}
if ( "${{needs.Setup.outputs.GitVersion_PreReleaseLabel}}" -eq "" ) {
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

0 comments on commit 335b7d1

Please sign in to comment.