name: Build on: push: branches: [ main ] pull_request: branches: [ main ] concurrency: group: build-${{ github.event.pull_request.number || github.ref }} cancel-in-progress: true jobs: build: if: github.repository == 'LykosAI/StabilityMatrix' runs-on: windows-latest steps: - uses: actions/checkout@v3 - name: Set up .NET uses: actions/setup-dotnet@v3 with: dotnet-version: '6.0.x' - name: Install dependencies run: dotnet restore -p:PublishReadyToRun=true - name: Build run: | dotnet publish ./StabilityMatrix/StabilityMatrix.csproj -o out -c Release -r win-x64 -p:PublishReadyToRun=true -p:PublishSingleFile=true --self-contained true mv ./out/StabilityMatrix.exe StabilityMatrix.exe rm -r ./out - name: Build (No Included .NET) run: | dotnet publish ./StabilityMatrix/StabilityMatrix.csproj -o out -c Release -r win-x64 -p:PublishReadyToRun=true -p:PublishSingleFile=true --self-contained false mv ./out/StabilityMatrix.exe StabilityMatrix-dotNET.exe - name: Upload Artifacts if: ${{ github.event_name == 'push' }} uses: actions/upload-artifact@v3 with: name: build path: "*.exe"