Skip to content

remove AssemblyAttribute dependency #9

remove AssemblyAttribute dependency

remove AssemblyAttribute dependency #9

Workflow file for this run

name: 'Update Version'
on:
push:
tags: [ '[0-9]+.[0-9]+.[0-9]+-?**' ]
workflow_dispatch:
defaults:
run:
shell: |
pwsh -noninteractive -command "try {{ $ErrorActionPreference='Stop'; . '{0}' }} catch {{ Write-Error ""FAILED: $_""; throw; }} if ((Test-Path -LiteralPath variable:\LASTEXITCODE)) {{ exit $LASTEXITCODE }}"
jobs:
# This job is required because C# is assholes and dotnet publish refuses to use the version number set by the SetVersion.ps1 script.
update-version-number:
runs-on: windows-latest
steps:
- uses: actions/checkout@v3
with:
ref: 'main'
fetch-depth: 0
- name: Update Version Numbers and Push Changes
run: |
$tag = $(git describe --tags --abbrev=0)
$tag -cmatch '(?<MAJOR>\d+?)\.(?<MINOR>\d+?)\.(?<PATCH>\d+?)(?<EXTRA>.*)' > $null
$tag_3_part = $Matches.MAJOR + '.' + $Matches.MINOR + '.' + $Matches.PATCH
$copyright = "Copyright © $((Get-Date).Year) by `$`(Authors`)"
.\SetVersion.ps1 -Path XamlTimers.csproj Version=$tag FileVersion=$tag_3_part Copyright=$copyright
# HEAD:github-actions