Skip to content

Commit

Permalink
fix: actions - create releases
Browse files Browse the repository at this point in the history
  • Loading branch information
lambiengcode committed Oct 17, 2023
1 parent c02ae06 commit d8d2986
Showing 1 changed file with 58 additions and 21 deletions.
79 changes: 58 additions & 21 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
- run: brew install ninja
- run: ./build.${{ matrix.name }}.sh "${{ github.event.inputs.commitHash }}"
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v1
with:
name: webrtc.${{ matrix.name }}.tar.gz
path: build/_package/${{ matrix.name }}/webrtc.tar.gz
Expand Down Expand Up @@ -74,7 +74,7 @@ jobs:
df -h
- run: ./build.${{ matrix.name }}.sh "${{ github.event.inputs.commitHash }}"
- name: Upload Artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v1
with:
name: webrtc.${{ matrix.name }}.tar.gz
path: build/_package/${{ matrix.name }}/webrtc.tar.gz
Expand All @@ -84,23 +84,60 @@ jobs:
needs:
- build-macos
- build-linux
runs-on: ubuntu-20.04
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/download
with:
platform: ios
- uses: ./.github/actions/download
with:
platform: android
- name: Env to output
run: |
echo "package_paths<<EOF" >> $GITHUB_OUTPUT
cat package_paths.env >> $GITHUB_OUTPUT
echo "EOF" >> $GITHUB_OUTPUT
id: env
- name: Release
uses: softprops/action-gh-release@v1
with:
files:
${{ steps.env.outputs.package_paths }}
- name: Create Release
id: create_release
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: ${{ github.ref }}
draft: false
prerelease: false
- name: Output upload url
shell: bash
run: echo "UPLOAD_URL='${{ steps.create_release.outputs.upload_url }}'" > create-release.env
- name: Upload create-release Environment
uses: actions/upload-artifact@v1
with:
name: create-release.env
path: create-release.env
upload-assets:
strategy:
fail-fast: false
matrix:
name:
- ios
- android
name: Release ${{ matrix.name }}
if: contains(github.ref, 'tags/m')
needs:
- create-release
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Download ${{ matrix.name }}
uses: actions/download-artifact@v1
with:
name: webrtc.${{ matrix.name }}.tar.gz
- uses: actions/download-artifact@v1
with:
name: create-release.env
- name: Env to output
shell: bash
run: |
source create-release.env/create-release.env
echo "::set-output name=upload_url::$UPLOAD_URL"
id: env
- name: Upload ${{ matrix.name }} Release Asset
uses: actions/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.TOKEN }}
with:
upload_url: ${{ steps.env.outputs.upload_url }}
asset_path: webrtc.${{ matrix.name }}.tar.gz/webrtc.tar.gz
asset_name: webrtc.${{ matrix.name }}.tar.gz
asset_content_type: application/gzip

0 comments on commit d8d2986

Please sign in to comment.