Skip to content

Commit

Permalink
feat: Cleanup of github action + gitversion tag setup
Browse files Browse the repository at this point in the history
  • Loading branch information
AlanRynne committed May 28, 2024
1 parent 6f738a0 commit ae0d739
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 21 deletions.
31 changes: 14 additions & 17 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@ name: .NET Build and Publish
on:
push:
branches: ["main", "dev", "dui3/alpha"]
pull_request:
branches:
- dui3/alpha

jobs:
build-and-publish:
Expand All @@ -26,41 +23,41 @@ jobs:
uses: actions/cache@v4
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}
key: ${{ runner.os }}-nuget-${{ hashFiles('**/packages.lock.json') }}

- name : Install GitVersion
- name: Install GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.x'
versionSpec: "5.x"

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Determine Version
id: version
uses: gittools/actions/gitversion/[email protected]

- name: Format
- name: 🗄️ Format
run: ./build.ps1 format

- name: Restore
- name: ♻️ Restore
run: ./build.ps1 restore

- name: Add msbuild to PATH
uses: microsoft/setup-msbuild@v2

- name: Build
- name: ⚒️ Build
run: ./build.ps1 build
env:
VERSION: ${{ env.fullSemVer }}
FILE_VERSION: ${{ env.assemblySemFileVer }}
run: ./build.ps1 build

- name: Pack
- name: 📦 Pack
run: ./build.ps1 zip

- name: Upload artifacts
- name: ⬆️ Upload artifacts
uses: actions/upload-artifact@v4
with:
name: output-${{ env.fullSemVer }}
path: output/*.*
compression-level: 0 # no compression
- name: Trigger Build Installers

- name: 🔫 Trigger Build Installers
run: ./build.ps1 build-installers ${{ secrets.CONNECTORS_GH_TOKEN }} ${{ github.run_id }} ${{ env.fullSemVer }}
12 changes: 8 additions & 4 deletions GitVersion.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
mode: ContinuousDelivery
assembly-informational-format: '{Major}.{Minor}.{Patch}-{PreReleaseLabel}'
branches:
assembly-informational-format: "{Major}.{Minor}.{Patch}-{PreReleaseLabel}"
branches:
main:
regex: ^latest$
regex: ^main$
tag: rc
dev:
regex: ^dev$
tag: beta
pull-request:
tag: pr
tag: wip

0 comments on commit ae0d739

Please sign in to comment.