version display issues #6
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish Release | |
on: | |
push: | |
branches: ["release"] | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Set version number | |
shell: pwsh | |
run: | | |
$versionNumber = "2.0.0" | |
$versionSuffix = "beta.1" | |
$infoVersion = "$versionNumber-$versionSuffix" | |
echo $infoVersion | |
echo "VERSION_NUMBER=$versionNumber" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append | |
echo "VERSION_SUFFIX=$versionSuffix" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append | |
echo "INFO_VERSION=$infoVersion" | Out-File -FilePath $Env:GITHUB_ENV -Encoding utf-8 -Append | |
- uses: actions/checkout@v4 | |
- name: Setup .NET | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: 7.0.x | |
- name: Publish for win-x64 | |
run: dotnet publish KaddaOK.AvaloniaApp.Windows/KaddaOK.AvaloniaApp.Windows.csproj /p:VersionPrefix=${{ env.VERSION_NUMBER }} /p:VersionSuffix=${{ env.VERSION_SUFFIX }} /p:Configuration=Release /p:RuntimeIdentifier=win-x64 /p:PublishSingleFile=true /p:PublishDir=${{ github.workspace }}/publish | |
- name: Zip for win-x64 | |
shell: pwsh | |
run: Compress-Archive -Path ${{ github.workspace }}/publish/* -DestinationPath KaddaOKTools_win-x64_${{ env.INFO_VERSION }}.zip | |
- name: Upload win-x64 Artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: KaddaOKTools_win-x64_${{ env.INFO_VERSION }} | |
path: KaddaOKTools_win-x64_${{ env.INFO_VERSION }}.zip | |
- name: Create Release | |
uses: ncipollo/[email protected] | |
with: | |
artifacts: "KaddaOKTools_win-x64_${{ env.INFO_VERSION }}.zip" | |
tag: ${{ env.INFO_VERSION }} |