Skip to content

Update dotnet-release.yml #5

Update dotnet-release.yml

Update dotnet-release.yml #5

Workflow file for this run

name: 'Create Release'
on:
push:
tags:
- 'v*.*.*'
jobs:
build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- name: Setup .NET 8.0
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Restore dependencies
run: dotnet restore ./src
- name: Build
run: dotnet build ./src/Nager.WindowsCalendarWeek/Nager.WindowsCalendarWeek.csproj --configuration Release --no-restore /p:NoWarn=1591
- name: Build project
run: |
dotnet publish ./src/Nager.WindowsCalendarWeek/Nager.WindowsCalendarWeek.csproj --configuration Release --self-contained false --runtime win-x64 -p:PublishReadyToRun=true -p:PublishSingleFile=true --output ./publish/temp
- uses: vimtor/action-zip@v1.2
with:
files: ./publish/temp
dest: ./publish/Nager.WindowsCalendarWeek.zip
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_name: nager/Nager.WindowsCalendarWeek
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./publish/Nager.WindowsCalendarWeek.zip
tag: ${{ github.ref_name }}
overwrite: true