diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index df81ef3f0e..336a0e0ff3 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -2,7 +2,8 @@ name: .NET Build on: pull_request: - branches: ["main"] + branches: + - "*" jobs: build-and-publish: @@ -11,6 +12,8 @@ jobs: steps: - name: Checkout uses: actions/checkout@v4 + with: + fetch-depth: 0 - name: Setup .NET uses: actions/setup-dotnet@v4 @@ -21,16 +24,28 @@ jobs: uses: actions/cache@v4 with: path: ~/.nuget/packages - key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} - - - name: Format - run: ./build.ps1 format + key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }} - - name: Restore - run: ./build.ps1 restore + - name: Install GitVersion + uses: gittools/actions/gitversion/setup@v1.1.1 + with: + versionSpec: "5.x" - name: Add msbuild to PATH uses: microsoft/setup-msbuild@v2 - - name: Build + - name: Determine Version + id: version + uses: gittools/actions/gitversion/execute@v1.1.1 + + - name: 🗄️ Format + run: ./build.ps1 format + + - name: ♻️ Restore + run: ./build.ps1 restore + + - name: ⚒️ Build run: ./build.ps1 build + env: + VERSION: ${{ env.fullSemVer }} + FILE_VERSION: ${{ env.assemblySemFileVer }} diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 9635494fbb..4cc4f7a807 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -2,10 +2,8 @@ name: .NET Build and Publish on: push: - branches: ["main", "dev", "dui3/alpha"] - pull_request: - branches: - - dui3/alpha + branches: ["main", "dev", "dui3/alpha", "dui3/ci/*"] + tags: ["3.*"] jobs: build-and-publish: