Skip to content

Profiles (#170)

Profiles (#170) #16

Workflow file for this run

name: Release
on:
push:
tags:
- "v*"
permissions:
contents: write
packages: write
jobs:
release:
name: Release
runs-on: windows-2022
steps:
- name: Authenticate GitHub package source
run: dotnet nuget add source --username USERNAME --password ${{ secrets.GITHUB_TOKEN }} --store-password-in-clear-text --name github "https://nuget.pkg.github.com/TQLApp/index.json"
- uses: actions/checkout@v4
- name: Fetch tags
run: git fetch --tags --force
- name: Get Build Version
id: get-build-version
shell: pwsh
run: ./scripts/GetBuildVersion.ps1 -Tag ${{ github.ref }}
- name: Setup dotnet 8.0.x
uses: actions/setup-dotnet@v3
with:
dotnet-version: 8.0.x
- uses: actions/cache@v3
id: cache
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-v2-${{ hashFiles('**/packages.lock.json') }}
- name: Restore Solution
run: dotnet restore -warnaserror
- name: Build Solution
run: dotnet build -c Release -property:Version="${{ steps.get-build-version.outputs.build-version }}" -warnaserror
- name: Publish NuGet packages to NuGet.org
run: dotnet nuget push "**/*.nupkg" --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: Publish symbol NuGet packages to NuGet.org
run: dotnet nuget push "**/*.snupkg" --api-key "${{ secrets.NUGET_API_KEY }}" --source https://api.nuget.org/v3/index.json --skip-duplicate
- name: Publish App
run: dotnet publish -c Release -r win-x64 --self-contained src\Tql.App -property:Version="${{ steps.get-build-version.outputs.build-version }}" -warnaserror
- name: Validate file versions
shell: pwsh
run: ./scripts/Validate-File-Versions.ps1 -Version "${{ steps.get-build-version.outputs.build-version }}"
- name: Create MSI
shell: pwsh
run: ./scripts/Create-MSI.ps1
- name: Get Tag Annotation
uses: ericcornelissen/git-tag-annotation-action@v2
id: tag-data
- name: Release
uses: softprops/action-gh-release@v1
with:
files: ./build/Tql*.msi
generate_release_notes: true
prerelease: true
body: ${{ steps.tag-data.outputs.git-tag-annotation }}