Skip to content

v3.1.8

v3.1.8 #50

Workflow file for this run

name: Release
on:
release:
types: [published]
jobs:
build:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .Net 8
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.x.x
- name: Clean
run: dotnet clean X4_ComplexCalculator.sln --configuration Release && dotnet nuget locals all --clear
- name: Restore dependencies
run: dotnet restore -r win-x64
- name: Build
run: dotnet publish -r win-x64 --self-contained X4_ComplexCalculator\X4_ComplexCalculator.csproj
- name: Compress archive
run: |
New-Item artifacts\X4_ComplexCalculator -ItemType Directory
Move-Item X4_ComplexCalculator\bin\Release\net8.0-windows7.0\win-x64 artifacts\X4_ComplexCalculator\bin
$WshShell = New-Object -comObject WScript.Shell
$Shortcut = $WshShell.CreateShortcut("$PWD\artifacts\X4_ComplexCalculator\X4_ComplexCalculator.exe.lnk")
$Shortcut.TargetPath = 'explorer'
$Shortcut.Arguments = 'bin\X4_ComplexCalculator.exe'
$Shortcut.IconLocation = 'imageres.dll,11'
$Shortcut.Save()
Compress-Archive -Path artifacts/X4_ComplexCalculator -DestinationPath X4_ComplexCalculator.zip
- name: Upload Release Asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_name: X4_ComplexCalculator.zip
asset_path: X4_ComplexCalculator.zip
asset_content_type: application/zip