Dubbing: Fix bug of changing window. v5.15.20 #86
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Release New Version" | |
# @see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags | |
on: | |
push: | |
tags: | |
- v* | |
jobs: | |
check-test-dev: | |
steps: | |
- name: Wait for Test Workflow | |
uses: fountainhead/[email protected] | |
id: wait-for-test | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
checkName: test-final | |
ref: ${{ github.sha }} | |
timeoutSeconds: 3600 | |
- name: Check Test Workflow result | |
if: steps.wait-for-test.outputs.conclusion != 'success' | |
run: | | |
echo "Test Workflow failed, aborting release" && exit 1 | |
runs-on: ubuntu-20.04 | |
check-test-online: | |
steps: | |
- name: Wait for Test Online Workflow | |
uses: fountainhead/[email protected] | |
id: wait-for-test | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
checkName: test-online-final | |
ref: ${{ github.sha }} | |
timeoutSeconds: 3600 | |
- name: Check Test Workflow result | |
if: steps.wait-for-test.outputs.conclusion != 'success' | |
run: | | |
echo "Test Workflow failed, aborting release" && exit 1 | |
runs-on: ubuntu-20.04 | |
envs: | |
needs: | |
- check-test-dev | |
- check-test-online | |
name: envs | |
steps: | |
# Git checkout | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# The github.ref is, for example, refs/tags/v5.0.145 or refs/tags/v5.0-r8 | |
# Generate variables like: | |
# SRS_TAG=v5.8.20 | |
# SRS_MAJOR=5 | |
# SRS_XYZ=5.8.20 | |
# @see https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable | |
- name: Generate varaiables | |
run: | | |
SRS_TAG=$(echo ${{ github.ref }}| awk -F '/' '{print $3}') | |
SRS_MAJOR=$(echo $SRS_TAG| awk -F '.' '{print $1}' |sed 's/v//g') | |
SRS_XYZ=$(echo $SRS_TAG |sed 's/v//g') | |
echo "SRS_TAG=$SRS_TAG" >> $GITHUB_ENV | |
echo "SRS_MAJOR=$SRS_MAJOR" >> $GITHUB_ENV | |
echo "SRS_XYZ=$SRS_XYZ" >> $GITHUB_ENV | |
echo "SRS_TAG:$SRS_TAG, SRS_MAJOR:$SRS_MAJOR, SRS_XYZ:$SRS_XYZ" | |
# Map a step output to a job output, see https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs | |
outputs: | |
SRS_TAG: ${{ env.SRS_TAG }} | |
SRS_MAJOR: ${{ env.SRS_MAJOR }} | |
SRS_XYZ: ${{ env.SRS_XYZ }} | |
runs-on: ubuntu-20.04 | |
docker: | |
needs: | |
- envs | |
steps: | |
- name: Covert output to env | |
run: | | |
echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV | |
echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV | |
echo "SRS_XYZ=${{ needs.envs.outputs.SRS_XYZ }}" >> $GITHUB_ENV | |
# Git checkout | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
# See https://github.com/crazy-max/ghaction-docker-buildx#moved-to-docker-organization | |
# https://github.com/docker/setup-qemu-action | |
- name: Set up QEMU | |
uses: docker/setup-qemu-action@v2 | |
# https://github.com/docker/setup-buildx-action | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v2 | |
# Create main images for Docker | |
- name: Login to docker hub | |
uses: docker/login-action@v2 | |
with: | |
username: "${{ secrets.DOCKER_USERNAME }}" | |
password: "${{ secrets.DOCKER_PASSWORD }}" | |
- name: Build the ui for multiple archs | |
run: | | |
echo "Build multiple language ui" | |
cd ui && make build-cn -j && make build-en -j | |
- name: Build SRS docker image | |
run: | | |
echo "Release ossrs/oryx:$SRS_TAG" | |
docker buildx build --platform linux/amd64,linux/arm64/v8 \ | |
--output "type=image,push=true" --build-arg MAKEARGS=build-no-ui \ | |
--tag ossrs/oryx:$SRS_TAG -f Dockerfile . | |
- name: Docker alias images for ossrs/oryx | |
uses: akhilerm/[email protected] | |
with: | |
src: ossrs/oryx:${{ env.SRS_TAG }} | |
dst: | | |
ossrs/oryx:${{ env.SRS_XYZ }} | |
# TODO: FIXME: If stable release, update it. | |
#ossrs/oryx:${{ env.SRS_MAJOR }} | |
#ossrs/oryx:v${{ env.SRS_MAJOR }} | |
runs-on: ubuntu-20.04 | |
aliyun: | |
needs: | |
- envs | |
- docker | |
steps: | |
- name: Covert output to env | |
run: | | |
echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV | |
echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV | |
echo "SRS_XYZ=${{ needs.envs.outputs.SRS_XYZ }}" >> $GITHUB_ENV | |
# Aliyun ACR | |
- name: Login Aliyun docker hub | |
uses: docker/login-action@v2 | |
with: | |
registry: registry.cn-hangzhou.aliyuncs.com | |
username: "${{ secrets.ACR_USERNAME }}" | |
password: "${{ secrets.ACR_PASSWORD }}" | |
- name: Docker alias images for ossrs/oryx | |
uses: akhilerm/[email protected] | |
with: | |
src: ossrs/oryx:${{ env.SRS_TAG }} | |
dst: | | |
registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:${{ env.SRS_TAG }} | |
registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:${{ env.SRS_XYZ }} | |
# TODO: FIXME: If stable release, update it. | |
#registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:${{ env.SRS_MAJOR }} | |
#registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:v${{ env.SRS_MAJOR }} | |
runs-on: ubuntu-20.04 | |
draft: | |
name: draft | |
needs: | |
- envs | |
- aliyun | |
steps: | |
- name: Create release draft | |
id: create_draft | |
uses: ncipollo/release-action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
allowUpdates: true | |
tag: ${{ github.ref }} | |
draft: true | |
# TODO: FIXME: If stable release, update it. | |
prerelease: true | |
# Map a step output to a job output, see https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs | |
outputs: | |
SRS_RELEASE_ID: ${{ steps.create_draft.outputs.id }} | |
runs-on: ubuntu-20.04 | |
plugin: | |
name: release-publication | |
runs-on: ubuntu-20.04 | |
needs: | |
- draft | |
- envs | |
steps: | |
################################################################################################################## | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
################################################################################################################## | |
- name: Covert output to env | |
run: | | |
echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV | |
echo "SRS_RELEASE_ID=${{ needs.draft.outputs.SRS_RELEASE_ID }}" >> $GITHUB_ENV | |
################################################################################################################## | |
# Create source tar for release. Note that it's for OpenWRT package srs-server, so the filename MUST be | |
# srs-server-xxx.tar.gz, because the package is named srs-server. | |
# Generate variables like: | |
# SRS_BT_SOURCE_FILE=oryx.zip | |
# SRS_BT_SOURCE_MD5=83e38700a80a26e30b2df054e69956e5 | |
# SRS_SOURCE_PATH=/tmp/oryx-asserts/*.zip | |
- name: Create source tar.gz | |
run: | | |
# | |
# For BT | |
bash scripts/setup-bt/auto/zip.sh --output /tmp/zip-for-bt && SRS_BT_SOURCE_FILE=bt-oryx.zip && | |
echo "SRS_BT_SOURCE_FILE=${SRS_BT_SOURCE_FILE}" >> $GITHUB_ENV && | |
echo "SRS_BT_SOURCE_MD5=$(md5sum /tmp/zip-for-bt/${SRS_BT_SOURCE_FILE}| awk '{print $1}')" >> $GITHUB_ENV | |
# | |
# For aaPanel | |
bash scripts/setup-aapanel/auto/zip.sh --output /tmp/zip-for-aapanel && SRS_AAPANEL_SOURCE_FILE=aapanel-oryx.zip && | |
echo "SRS_AAPANEL_SOURCE_FILE=${SRS_AAPANEL_SOURCE_FILE}" >> $GITHUB_ENV && | |
echo "SRS_AAPANEL_SOURCE_MD5=$(md5sum /tmp/zip-for-aapanel/${SRS_AAPANEL_SOURCE_FILE}| awk '{print $1}')" >> $GITHUB_ENV | |
# | |
# For Ubuntu script: zh | |
bash scripts/setup-ubuntu/build.sh --output /tmp/zip-for-ubuntu --language zh && SRS_UBUNTU_ZH_SOURCE_FILE=linux-oryx-zh.tar.gz && | |
echo "SRS_UBUNTU_ZH_SOURCE_FILE=${SRS_UBUNTU_ZH_SOURCE_FILE}" >> $GITHUB_ENV && | |
echo "SRS_UBUNTU_ZH_SOURCE_FILE_MD5=$(md5sum /tmp/zip-for-ubuntu/${SRS_UBUNTU_ZH_SOURCE_FILE}| awk '{print $1}')" >> $GITHUB_ENV | |
# | |
# For Ubuntu script: en | |
bash scripts/setup-ubuntu/build.sh --output /tmp/zip-for-ubuntu --language en && SRS_UBUNTU_EN_SOURCE_FILE=linux-oryx-en.tar.gz && | |
echo "SRS_UBUNTU_EN_SOURCE_FILE=${SRS_UBUNTU_EN_SOURCE_FILE}" >> $GITHUB_ENV && | |
echo "SRS_UBUNTU_EN_SOURCE_FILE_MD5=$(md5sum /tmp/zip-for-ubuntu/${SRS_UBUNTU_EN_SOURCE_FILE}| awk '{print $1}')" >> $GITHUB_ENV | |
# | |
echo "Gather asserts" | |
SRS_SOURCE_PATH=/tmp/oryx-asserts && rm -rf $SRS_SOURCE_PATH && mkdir -p $SRS_SOURCE_PATH && | |
mv /tmp/zip-for-bt/${SRS_BT_SOURCE_FILE} $SRS_SOURCE_PATH && | |
mv /tmp/zip-for-aapanel/${SRS_AAPANEL_SOURCE_FILE} $SRS_SOURCE_PATH && | |
mv /tmp/zip-for-ubuntu/${SRS_UBUNTU_ZH_SOURCE_FILE} $SRS_SOURCE_PATH && | |
mv /tmp/zip-for-ubuntu/${SRS_UBUNTU_EN_SOURCE_FILE} $SRS_SOURCE_PATH && | |
ls -lh $SRS_SOURCE_PATH && | |
echo "SRS_SOURCE_PATH=${SRS_SOURCE_PATH}/*" >> $GITHUB_ENV | |
################################################################################################################## | |
# Upload release source files | |
- name: Upload Release Assets Source | |
id: upload-release-assets-source | |
uses: dwenegar/upload-release-assets@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
with: | |
release_id: ${{ env.SRS_RELEASE_ID }} | |
assets_path: ${{ env.SRS_SOURCE_PATH }} | |
################################################################################################################## | |
- name: Update release | |
id: update_release | |
uses: ncipollo/release-action@v1 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SRS_TAG: ${{ env.SRS_TAG }} | |
with: | |
allowUpdates: true | |
tag: ${{ github.ref }} | |
name: Release Oryx ${{ env.SRS_TAG }} | |
body: | | |
[${{ github.event.head_commit.message }}](https://github.com/ossrs/oryx/commit/${{ github.sha }}) | |
## English | |
* [docker pull ossrs/oryx:${{ env.SRS_TAG }}](https://ossrs.io/lts/en-us/docs/v5/doc/getting-started-stack#docker) | |
* [DigitalOcean](https://marketplace.digitalocean.com/apps/srs): [Tutorial](https://blog.ossrs.io/how-to-setup-a-video-streaming-service-by-1-click-e9fe6f314ac6) | |
* Ubuntu Script: ${{ env.SRS_UBUNTU_EN_SOURCE_FILE_MD5 }} [${{ env.SRS_UBUNTU_EN_SOURCE_FILE }}](https://github.com/ossrs/oryx/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_UBUNTU_EN_SOURCE_FILE }}) | |
* [aaPanel](https://aapanel.com) Plugin: ${{ env.SRS_AAPANEL_SOURCE_MD5 }} [${{ env.SRS_AAPANEL_SOURCE_FILE }}](https://github.com/ossrs/oryx/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_AAPANEL_SOURCE_FILE }}) | |
* [Changelog](https://ossrs.io/lts/en-us/faq-oryx#changelog) | |
* [Features](https://ossrs.io/lts/en-us/faq-oryx#features) | |
## Chinese | |
* [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:${{ env.SRS_TAG }}](https://ossrs.net/lts/zh-cn/docs/v5/doc/getting-started-stack#docker) | |
* [Lighthouse](https://mp.weixin.qq.com/s/fWmdkw-2AoFD_pEmE_EIkA): [Tutorial](https://www.bilibili.com/video/BV1844y1L7dL) | |
* Ubuntu Script: ${{ env.SRS_UBUNTU_ZH_SOURCE_FILE_MD5 }} [${{ env.SRS_UBUNTU_ZH_SOURCE_FILE }}](https://gitee.com/ossrs/oryx/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_UBUNTU_ZH_SOURCE_FILE }}) | |
* [BT](https://bt.cn) Plugin: ${{ env.SRS_BT_SOURCE_MD5 }} [${{ env.SRS_BT_SOURCE_FILE }}](https://gitee.com/ossrs/oryx/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_BT_SOURCE_FILE }}) | |
* [aaPanel](https://aapanel.com) Plugin: ${{ env.SRS_AAPANEL_SOURCE_MD5 }} [${{ env.SRS_AAPANEL_SOURCE_FILE }}](https://gitee.com/ossrs/oryx/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_AAPANEL_SOURCE_FILE }}) | |
* [Changelog](https://ossrs.net/lts/zh-cn/faq-oryx#changelog) | |
* [Features](https://ossrs.net/lts/zh-cn/faq-oryx#features) | |
# TODO: FIXME: If stable release, update it. | |
## English | |
#* [docker pull ossrs/oryx:5](https://ossrs.io/lts/en-us/docs/v5/doc/getting-started-stack#docker) | |
## Chinese | |
#* [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/oryx:5](https://ossrs.net/lts/zh-cn/docs/v5/doc/getting-started-stack#docker) | |
draft: false | |
# TODO: FIXME: If stable release, update it. | |
prerelease: true | |
makeLatest: false |