Skip to content

Commit

Permalink
Updarte and ship new build frame
Browse files Browse the repository at this point in the history
  • Loading branch information
MrHinsh committed Jul 5, 2024
1 parent 8f88155 commit 5416934
Showing 1 changed file with 102 additions and 0 deletions.
102 changes: 102 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
name: Azure DevOps Migration Tools Build & Release

on:
push:
workflow_dispatch:

jobs:
Setup:
name: "Setup & Configuration"
runs-on: ubuntu-latest
outputs:
GitVersion_BranchName: ${{ steps.gitversion.outputs.GitVersion_BranchName }}
GitVersion_SemVer: ${{ steps.gitversion.outputs.GitVersion_SemVer }}
GitVersion_PreReleaseLabel: ${{ steps.gitversion.outputs.GitVersion_PreReleaseLabel }}
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
includePrerelease: true
- name: Execute GitVersion
id: gitversion
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true

SetupValidatorStage:
name: "Setup Validator"
runs-on: ubuntu-latest
needs: Setup
steps:
- name: "Release WorkItemClone"
shell: pwsh
run: |
Write-Output "GitVersion_BranchName: ${{needs.Setup.outputs.GitVersion_BranchName}}"
Write-Output "GitVersion_SemVer: ${{needs.Setup.outputs.GitVersion_SemVer}}"
Write-Output "GitVersion_PreReleaseLabel: ${{needs.Setup.outputs.GitVersion_PreReleaseLabel}}"
build:
name: "Build & Test"
runs-on: windows-latest
needs: Setup
steps:
- uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v1
with:
dotnet-version: 4.x
- run: dotnet build
- run: dotnet test

BuildDocs:
name: "Release to GitHub Wiki"
runs-on: ubuntu-latest
needs: [build]
if: ${{ success() && ( needs.Setup.outputs.GitVersion_PreReleaseLabel == 'Preview' || needs.Setup.outputs.GitVersion_PreReleaseLabel == '' ) }}
steps:
- uses: actions/checkout@v3

GitHubRelease:
name: "Release to GitHub Releases"
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

MarketplaceRelease:
name: "Release to Marketplace"
runs-on: ubuntu-latest
needs: [build, Setup, GitHubRelease]
if: ${{ success() && ( needs.Setup.outputs.GitVersion_PreReleaseLabel == 'Preview' || needs.Setup.outputs.GitVersion_PreReleaseLabel == '' ) }}
steps:
- uses: actions/checkout@v4

ChocolateyRelease:
name: "Release to Chocolatey"
runs-on: ubuntu-latest
needs: [build, Setup, GitHubRelease]
if: ${{ success() && ( needs.Setup.outputs.GitVersion_PreReleaseLabel == 'Preview' || needs.Setup.outputs.GitVersion_PreReleaseLabel == '' ) }}
steps:
- uses: actions/checkout@v4

WingetRelease:
name: "Release to Chocolatey"
runs-on: ubuntu-latest
needs: [build, Setup, GitHubRelease]
if: ${{ success() && ( needs.Setup.outputs.GitVersion_PreReleaseLabel == 'Preview' || needs.Setup.outputs.GitVersion_PreReleaseLabel == '' ) }}
steps:
- uses: actions/checkout@v4

DocsRelease:
name: "Release to Docs"
runs-on: ubuntu-latest
needs: [BuildDocs, Setup, GitHubRelease]
if: ${{ success() && ( needs.Setup.outputs.GitVersion_PreReleaseLabel == 'Preview' || needs.Setup.outputs.GitVersion_PreReleaseLabel == '' ) }}
steps:
- uses: actions/checkout@v4

0 comments on commit 5416934

Please sign in to comment.