Skip to content

Bump app version to 1.8.0 for SDK 6.0.0 compatibility #54

Bump app version to 1.8.0 for SDK 6.0.0 compatibility

Bump app version to 1.8.0 for SDK 6.0.0 compatibility #54

Workflow file for this run

name: Release
on:
push:
tags:
- 'v*.*.*'
permissions:
contents: write
id-token: write # Required for Azure OIDC authentication
env:
DOTNET_VERSION: '10.0.x'
PROJECT_PATH: 'src/SendspinClient/SendspinClient.csproj'
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: ${{ env.DOTNET_VERSION }}
- name: Extract version from tag
id: version
run: |
$version = "${{ github.ref_name }}".TrimStart('v')
echo "VERSION=$version" >> $env:GITHUB_OUTPUT
echo "Version: $version"
- name: Restore dependencies
run: dotnet restore ${{ env.PROJECT_PATH }}
- name: Build Release
run: dotnet build ${{ env.PROJECT_PATH }} -c Release --no-restore -p:Version=${{ steps.version.outputs.VERSION }}
- name: Publish win-x64 (framework-dependent)
run: |
dotnet publish ${{ env.PROJECT_PATH }} -c Release -r win-x64 --self-contained false -p:Version=${{ steps.version.outputs.VERSION }} -o src/SendspinClient/bin/publish/win-x64-framework
- name: Publish win-x64 (self-contained)
run: |
dotnet publish ${{ env.PROJECT_PATH }} -c Release -r win-x64 --self-contained true -p:PublishSingleFile=false -p:PublishTrimmed=false -p:Version=${{ steps.version.outputs.VERSION }} -o src/SendspinClient/bin/publish/win-x64-selfcontained
# Sign the main application EXEs before creating installers
- name: Sign Application EXEs (framework-dependent)
uses: azure/trusted-signing-action@v0
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
endpoint: ${{ secrets.TRUSTED_SIGNING_ENDPOINT }}
trusted-signing-account-name: ${{ secrets.TRUSTED_SIGNING_ACCOUNT }}
certificate-profile-name: ${{ secrets.TRUSTED_SIGNING_PROFILE }}
files-folder: src/SendspinClient/bin/publish/win-x64-framework
files-folder-filter: exe
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Sign Application EXEs (self-contained)
uses: azure/trusted-signing-action@v0
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
endpoint: ${{ secrets.TRUSTED_SIGNING_ENDPOINT }}
trusted-signing-account-name: ${{ secrets.TRUSTED_SIGNING_ACCOUNT }}
certificate-profile-name: ${{ secrets.TRUSTED_SIGNING_PROFILE }}
files-folder: src/SendspinClient/bin/publish/win-x64-selfcontained
files-folder-filter: exe
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Create dist directory
run: New-Item -ItemType Directory -Force -Path dist
- name: Install Inno Setup
run: choco install innosetup -y
- name: Build Installer (framework-dependent)
run: |
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DMyAppVersion=${{ steps.version.outputs.VERSION }} /DBuildType=framework installer/SendspinClient.iss
- name: Build Installer (self-contained)
run: |
& "C:\Program Files (x86)\Inno Setup 6\ISCC.exe" /DMyAppVersion=${{ steps.version.outputs.VERSION }} /DBuildType=selfcontained installer/SendspinClient.iss
# List output to verify
Get-ChildItem -Path dist -Recurse
# Sign the installer EXEs so SmartScreen doesn't warn
- name: Sign Installer EXEs
uses: azure/trusted-signing-action@v0
with:
azure-tenant-id: ${{ secrets.AZURE_TENANT_ID }}
azure-client-id: ${{ secrets.AZURE_CLIENT_ID }}
azure-client-secret: ${{ secrets.AZURE_CLIENT_SECRET }}
endpoint: ${{ secrets.TRUSTED_SIGNING_ENDPOINT }}
trusted-signing-account-name: ${{ secrets.TRUSTED_SIGNING_ACCOUNT }}
certificate-profile-name: ${{ secrets.TRUSTED_SIGNING_PROFILE }}
files-folder: dist
files-folder-filter: exe
file-digest: SHA256
timestamp-rfc3161: http://timestamp.acs.microsoft.com
timestamp-digest: SHA256
- name: Create portable ZIPs
run: |
Compress-Archive -Path src/SendspinClient/bin/publish/win-x64-framework/* -DestinationPath dist/WindowsSpin-${{ steps.version.outputs.VERSION }}-portable-win-x64.zip
Compress-Archive -Path src/SendspinClient/bin/publish/win-x64-selfcontained/* -DestinationPath dist/WindowsSpin-${{ steps.version.outputs.VERSION }}-portable-selfcontained-win-x64.zip
- name: Create Release
uses: softprops/action-gh-release@v2
with:
name: WindowsSpin ${{ steps.version.outputs.VERSION }}
draft: false
prerelease: ${{ contains(github.ref_name, '-') }}
generate_release_notes: true
files: |
dist/WindowsSpin-${{ steps.version.outputs.VERSION }}-Setup.exe
dist/WindowsSpin-${{ steps.version.outputs.VERSION }}-Setup-SelfContained.exe
dist/WindowsSpin-${{ steps.version.outputs.VERSION }}-portable-win-x64.zip
dist/WindowsSpin-${{ steps.version.outputs.VERSION }}-portable-selfcontained-win-x64.zip
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Publish to Windows Package Manager (winget)
# NOTE: Commented out until package is accepted into winget repository
# Once accepted, uncomment this job to auto-publish new releases
# publish-winget:
# name: Publish to winget
# runs-on: windows-latest
# needs: build
# # Only publish stable releases (skip prereleases like v0.5.0-beta)
# if: ${{ !contains(github.ref_name, '-') }}
# steps:
# - name: Publish to winget
# uses: vedantmgoyal9/winget-releaser@v2
# with:
# identifier: chrisuthe.WindowsSpin
# installers-regex: '-Setup-SelfContained\.exe$'
# token: ${{ secrets.WINGET_TOKEN }}