Skip to content

Release

Release #2

Workflow file for this run

name: Release
on:
release:
types: [published]
workflow_dispatch:
jobs:
build:
runs-on: windows-latest
strategy:
matrix:
target: [ win-x64, linux-x64 ]
steps:
- name: Check out repository code
uses: actions/checkout@v4
- name: Install .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Setup MSBuild.exe
uses: microsoft/setup-msbuild@v2
- name: Build ${{ matrix.target }}
run: |
dotnet publish -c Release -r ${{ matrix.target }} --self-contained -p:PublishTrimmed=True
cd bin\Release\net8.0\${{ matrix.target }}\publish
rm *.dbg
tar -cavf "NewRGB-${{ matrix.target }}.zip" *
- name: Upload
uses: actions/upload-artifact@v3
with:
name: NewRGB.zip
path: bin\Release\net8.0\${{ matrix.target }}\publish\NewRGB-${{ matrix.target }}.zip
- name: Publish in release
uses: softprops/action-gh-release@v1
if: github.ref_type == 'tag'
with:
files: |
bin/Release/net8.0/${{ matrix.target }}/publish/NewRGB-${{ matrix.target }}.zip
token: ${{ secrets.GITHUB_TOKEN }}