Skip to content

Commit

Permalink
automatically publish rtc builds (#240)
Browse files Browse the repository at this point in the history
  • Loading branch information
theomonnom authored Nov 13, 2023
1 parent a26ddbd commit 86d007e
Showing 1 changed file with 27 additions and 4 deletions.
31 changes: 27 additions & 4 deletions .github/workflows/webrtc-builds.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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/*

0 comments on commit 86d007e

Please sign in to comment.