Skip to content

Fixed csproj (hopefully) #10

Fixed csproj (hopefully)

Fixed csproj (hopefully) #10

name: .NET Release Workflow for Windows (x64)
on:
push:
tags:
- 'v*'
jobs:
build:
runs-on: windows-latest
steps:
# Step 1
- name: Checkout repository
uses: actions/checkout@v2
# Step 2
- name: Setup .NET
uses: actions/setup-dotnet@v2
with:
dotnet-version: '8.0'
# Step 3
- name: Restore dependencies
run: dotnet restore
# Step 4
- name: Build the project
run: dotnet build --configuration Release --runtime win-x64 --self-contained --framework net8.0 -p:Optimize=true
# Step 5
- name: Run tests
run: dotnet test
# Step 6
- name: Publish the project
run: dotnet publish --configuration Release --runtime win-x64 --self-contained --framework net8.0 -p:Optimize=true --output ./publish
# Step 7
- name: Create ZIP archives
run: |
cd ./publish
powershell Compress-Archive -Path * -DestinationPath "../WriterSharp_win64.zip"
# Step 8
- name: Create TAR.GZ archives
run: |
cd ./publish
tar -czvf "../WriterSharp_win64.tar.gz" *
# Step 9
- name: Create Release
uses: softprops/action-gh-release@v1
with:
files: |
./*.zip
./*.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}