test possible version naming implementation in release assets #151
Workflow file for this run
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: .NET 6.0 Desktop Build and Publish | |
on: | |
push: | |
tags: | |
- '*' | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Setup .NET 6.0 | |
uses: actions/setup-dotnet@v4 | |
with: | |
dotnet-version: '6.0.x' | |
- name: Restore dependencies | |
run: dotnet restore --runtime win-x64 | |
- name: Build the solution | |
run: dotnet build --configuration Release --no-restore | |
- name: Publish the application | |
run: dotnet publish D:\a\ATA-GUI\ATA-GUI\ATA-GUI\ATA-GUI.csproj --configuration Release --runtime win-x64 --self-contained false /p:PublishSingleFile=true --output ./publish | |
- name: Get Previous tag | |
id: previoustag | |
uses: "WyriHaximus/[email protected]" | |
- name: Zip the published output | |
run: Compress-Archive -Path ./publish/ATA-GUI.exe, ./LICENSE -DestinationPath ATA-GUI_${{ steps.previoustag.outputs.tag }}.zip | |
shell: pwsh | |
- name: Create Release | |
uses: ncipollo/[email protected] | |
with: | |
generateReleaseNotes: true | |
artifacts: ATA-GUI_${{ steps.previoustag.outputs.tag }}.zip | |
name: ${{ steps.previoustag.outputs.tag }} | |
tag: ${{ steps.previoustag.outputs.tag }} | |
token: ${{ secrets.GITHUB_TOKEN }} |