diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2af732..9ba146f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -30,19 +30,10 @@ jobs: - name: Setup .NET 8 uses: actions/setup-dotnet@v4 with: - dotnet-version: '8.0.x' + dotnet-version: "8.0.x" - name: Restore run: msbuild Colors.Dev.sln /t:Restore /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} - name: Build run: msbuild Colors.Dev.sln /m /p:Configuration=${{ matrix.configuration }} /p:Platform=${{ matrix.platform }} - - - name: Upload build artifacts - uses: actions/upload-artifact@v4 - with: - name: Colors.Dev-${{ matrix.configuration }}-${{ matrix.platform }} - path: | - **/bin/${{ matrix.platform }}/${{ matrix.configuration }}/** - **/${{ matrix.platform }}/${{ matrix.configuration }}/** - if-no-files-found: warn diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..94766c3 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,44 @@ +name: Release + +on: + push: + tags: + - "v*" + +permissions: + contents: write + +jobs: + release: + runs-on: windows-latest + + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: Setup MSBuild + uses: microsoft/setup-msbuild@v2 + + - name: Setup .NET 8 + uses: actions/setup-dotnet@v4 + with: + dotnet-version: "8.0.x" + + - name: Restore + run: msbuild Colors.Dev.sln /t:Restore /p:Configuration=Release /p:Platform=x64 + + - name: Build + run: msbuild Colors.Dev.sln /m /p:Configuration=Release /p:Platform=x64 + + - name: Package + shell: pwsh + run: | + New-Item -ItemType Directory -Force -Path release | Out-Null + Copy-Item "x64/Release/Colors.Dev.dll" -Destination release + Copy-Item "x64/Release/Colors.Dev.lib" -Destination release + Copy-Item "*.h" -Destination release -ErrorAction SilentlyContinue + + - name: Create GitHub Release + uses: softprops/action-gh-release@v2 + with: + files: release/*