Add GitHub Actions workflow for releasing executable #1
Workflow file for this run
This file contains hidden or 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: Release Executable | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-release: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v4 | |
| with: | |
| dotnet-version: 6.0.x | |
| - name: Publish win-x64 single-file executable | |
| shell: pwsh | |
| run: | | |
| dotnet restore DataversePluginWrapper.csproj | |
| dotnet publish DataversePluginWrapper.csproj -c Release -r win-x64 --self-contained true /p:PublishSingleFile=true /p:IncludeNativeLibrariesForSelfExtract=true /p:PublishTrimmed=false -o publish/win-x64 | |
| - name: Package release zip | |
| shell: pwsh | |
| run: | | |
| Compress-Archive -Path publish/win-x64/* -DestinationPath publish/DataversePluginWrapper-win-x64.zip | |
| - name: Upload asset to GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| files: publish/DataversePluginWrapper-win-x64.zip |