Skip to content

Commit

Permalink
Add release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
roxanneskelly committed Sep 8, 2023
1 parent f8c080b commit cfda0df
Show file tree
Hide file tree
Showing 2 changed files with 153 additions and 43 deletions.
44 changes: 1 addition & 43 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -115,46 +115,4 @@ jobs:
with:
name: webrtc.${{ matrix.name }}.tar.bz2
path: build/_package/${{ matrix.name }}/webrtc.tar.bz2
upload-assets:
strategy:
fail-fast: false
matrix:
name:
# - macos_arm64
- macos_x86_64
- windows_x86_64
# - windows_arm64
- windows_x86
# - ios
# - raspberry-pi-os_armv6
# - raspberry-pi-os_armv7
# - raspberry-pi-os_armv8
# - ubuntu-18.04_armv8
# - ubuntu-20.04_armv8
# - ubuntu-18.04_x86_64
# - ubuntu-20.04_x86_64
# - ubuntu-22.04_x86_64
# - android
name: Release ${{ matrix.name }}
if: contains(github.ref, 'tags/m')
needs:
- build-macos
- build-windows
# - build-linux
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.bz2
- name: Upload ${{ matrix.name }} Release Asset
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: webrtc.${{ matrix.name }}.tar.bz2/webrtc.tar.bz2
asset_name: webrtc.${{ matrix.name }}.tar.bz2
asset_content_type: application/bz2

152 changes: 152 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
name: build

on:
release:
types: [published]
push:
paths-ignore:
- '**.md'
- 'LICENSE'
- 'NOTICE'
- '.gitignore'
- '.dockerignore'

jobs:
build-windows:
defaults:
run:
working-directory: .\\build
strategy:
fail-fast: false
matrix:
name:
- windows_x86_64
# - windows_arm64
- windows_x86
runs-on: windows-2019
steps:
- uses: actions/checkout@v2
- name: Disk Cleanup
run: |
Get-PSDrive
# Cache 済み Docker Image の削除
# Clean unused docker images
docker rmi $(docker images -q -a)
# Android SDK の削除
# Delete Android SDK
Remove-Item -Recurse -Force $Env:ANDROID_HOME -ErrorAction Ignore
Remove-Item -Recurse -Force $Env:ANDROID_NDK_HOME -ErrorAction Ignore
# JVM の削除
# Delete JVM
Remove-Item -Recurse -Force $Env:JAVA_HOME_11_X64 -ErrorAction Ignore
Remove-Item -Recurse -Force $Env:JAVA_HOME_8_X64 -ErrorAction Ignore
Get-PSDrive
- run: "& .\\build.${{ matrix.name }}.ps1 \"${{ github.event.inputs.commitHash }}\""
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: webrtc.${{ matrix.name }}.bz2
path: build\_package\${{ matrix.name }}\webrtc.tar.bz2
build-macos:
defaults:
run:
working-directory: ./build
strategy:
fail-fast: false
matrix:
name:
# - macos_arm64
- macos_x86_64
# - ios
runs-on: macos-11
steps:
- uses: actions/checkout@v2
- name: Select Xcode 13.0
run: sudo xcode-select --switch /Applications/Xcode_13.0.app/Contents/Developer
- run: brew install ninja
- run: ./build.${{ matrix.name }}.sh "${{ github.event.inputs.commitHash }}"
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: webrtc.${{ matrix.name }}.tar.bz2
path: build/_package/${{ matrix.name }}/webrtc.tar.bz2
build-linux:
if: false
defaults:
run:
working-directory: ./build
strategy:
fail-fast: false
matrix:
name:
# - raspberry-pi-os_armv6
# - raspberry-pi-os_armv7
# - raspberry-pi-os_armv8
# - ubuntu-18.04_armv8
# - ubuntu-20.04_armv8
# - ubuntu-18.04_x86_64
# - ubuntu-20.04_x86_64
# - ubuntu-22.04_x86_64
- android
runs-on: buildjet-4vcpu-ubuntu-2204
steps:
- uses: actions/checkout@v2
- name: Disk Cleanup
run: |
df -h
docker container prune -f
docker image prune -a -f
# 3.9GB
sudo rm -rf /usr/local/share/boost
# 17GB
sudo rm -rf /usr/share/dotnet
df -h
- run: ./build.${{ matrix.name }}.sh "${{ github.event.inputs.commitHash }}"
- name: Upload Artifact
uses: actions/upload-artifact@v1
with:
name: webrtc.${{ matrix.name }}.tar.bz2
path: build/_package/${{ matrix.name }}/webrtc.tar.bz2
upload-assets:
strategy:
fail-fast: false
matrix:
name:
# - macos_arm64
- macos_x86_64
- windows_x86_64
# - windows_arm64
- windows_x86
# - ios
# - raspberry-pi-os_armv6
# - raspberry-pi-os_armv7
# - raspberry-pi-os_armv8
# - ubuntu-18.04_armv8
# - ubuntu-20.04_armv8
# - ubuntu-18.04_x86_64
# - ubuntu-20.04_x86_64
# - ubuntu-22.04_x86_64
# - android
name: Release ${{ matrix.name }}
if: contains(github.ref, 'tags/m')
needs:
- build-macos
- build-windows
# - build-linux
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.bz2
- name: Upload ${{ matrix.name }} Release Asset
uses: actions/upload-release-asset@v1.0.1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: webrtc.${{ matrix.name }}.tar.bz2/webrtc.tar.bz2
asset_name: webrtc.${{ matrix.name }}.tar.bz2
asset_content_type: application/bz2

0 comments on commit cfda0df

Please sign in to comment.