diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 000000000..39ca72dae --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,73 @@ +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + runtime: + - linux-x64 + - linux-arm64 + - linux-arm + - win-x64 + - osx-x64 + - osx-arm64 + + steps: + + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup .NET + uses: actions/setup-dotnet@v4 + with: + dotnet-version: 8.0.x + + - name: Publish + run: | + dotnet publish src/ErsatzTV/ErsatzTV.csproj \ + -c Release \ + -r ${{ matrix.runtime }} \ + --self-contained true \ + -o publish/${{ matrix.runtime }} + + - name: Zip build + run: | + cd publish + zip -r ersatztv-${{ matrix.runtime }}.zip ${{ matrix.runtime }} + + - name: Upload artifact + uses: actions/upload-artifact@v4 + with: + name: ersatztv-${{ matrix.runtime }} + path: publish/ersatztv-${{ matrix.runtime }}.zip + + + release: + + needs: build + runs-on: ubuntu-latest + + permissions: + contents: write + + steps: + + - name: Download artifacts + uses: actions/download-artifact@v4 + with: + path: artifacts + merge-multiple: true + + - name: Create release + uses: softprops/action-gh-release@v2 + with: + files: artifacts/*.zip