From 4cc3d10fdb1754ee482f7a378666a53b0aa09730 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?The=CC=81o=20Monnom?= Date: Mon, 13 Nov 2023 10:53:52 -0800 Subject: [PATCH] automatically publish rtc builds --- .github/workflows/webrtc-builds.yml | 31 +++++++++++++++++++++++++---- 1 file changed, 27 insertions(+), 4 deletions(-) diff --git a/.github/workflows/webrtc-builds.yml b/.github/workflows/webrtc-builds.yml index 16a9c396..0e2472b7 100644 --- a/.github/workflows/webrtc-builds.yml +++ b/.github/workflows/webrtc-builds.yml @@ -143,16 +143,39 @@ jobs: - name: Zip artifact (Unix) if: ${{ matrix.target.os != 'windows-latest' }} run: | - cd webrtc-sys/libwebrtc/${{ steps.setup.outputs.OUT }} - zip ${{ github.workspace }}/${{ steps.setup.outputs.ZIP }} ./* -r + cd webrtc-sys/libwebrtc + zip ${{ github.workspace }}/${{ steps.setup.outputs.ZIP }} ${{ steps.setup.outputs.OUT }} -r - name: Zip artifact (Windows) if: ${{ matrix.target.os == 'windows-latest' }} - run: Compress-Archive -Path .\webrtc-sys\libwebrtc\${{ steps.setup.outputs.OUT }}\* -DestinationPath ${{ steps.setup.outputs.ZIP }} + run: Compress-Archive -Path .\webrtc-sys\libwebrtc\${{ steps.setup.outputs.OUT }} -DestinationPath ${{ steps.setup.outputs.ZIP }} - # doublezip here but I don't think there is an alternative - name: Upload artifacts uses: actions/upload-artifact@v3 with: name: webrtc-builds path: ${{ steps.setup.outputs.ZIP }} + + + release: + name: Release to GH (Draft) + runs-on: ubuntu-latest + needs: build + permissions: + contents: write + if: startsWith(github.ref, 'refs/tags/webrtc-') + env: + GH_TOKEN: ${{ github.token }} + steps: + - uses: actions/checkout@v3 + + - name: Download artifacts + uses: actions/download-artifact@v3 + with: + name: webrtc-builds + path: ${{ github.workspace }}/webrtc-builds + + - name: Create draft release + run: | + gh release create ${{ github.ref_name }} --draft --title "${{ github.ref_name }}" + gh release upload ${{ github.ref_name }} ${{ github.workspace }}/webrtc-builds/*