Skip to content

Release v5.9.25

Release v5.9.25 #21

Workflow file for this run

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/action-wait-for-check@v1.1.0
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/action-wait-for-check@v1.1.0
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
# @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')
echo "SRS_TAG=$SRS_TAG" >> $GITHUB_ENV
echo "SRS_MAJOR=$SRS_MAJOR" >> $GITHUB_ENV
echo "SRS_TAG:$SRS_TAG, SRS_MAJOR:$SRS_MAJOR"
# 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 }}
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
# 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/srs-stack:$SRS_TAG"
docker buildx build --platform linux/amd64,linux/arm/v7,linux/arm64/v8 \
--output "type=image,push=true" --build-arg MAKEARGS=build-no-ui \
--tag ossrs/srs-stack:$SRS_TAG -f Dockerfile .
- name: Docker alias images for ossrs/srs-stack
uses: akhilerm/tag-push-action@v2.1.0
with:
src: ossrs/srs-stack:${{ env.SRS_TAG }}
dst: |
ossrs/srs-cloud:${{ env.SRS_TAG }}
ossrs/srs-cloud:platform-${{ env.SRS_TAG }}
# TODO: FIXME: If stable release, update it.
#ossrs/srs-stack:${{ env.SRS_MAJOR }}
#ossrs/srs-stack:v${{ env.SRS_MAJOR }}
#ossrs/srs-cloud:${{ env.SRS_MAJOR }}
#ossrs/srs-cloud:v${{ env.SRS_MAJOR }}
#ossrs/srs-cloud:platform-${{ env.SRS_MAJOR }}
#ossrs/srs-cloud:platform-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
# 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/srs-stack
uses: akhilerm/tag-push-action@v2.1.0
with:
src: ossrs/srs-stack:${{ env.SRS_TAG }}
dst: |
registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:${{ env.SRS_TAG }}
registry.cn-hangzhou.aliyuncs.com/ossrs/srs-cloud:${{ env.SRS_TAG }}
registry.cn-hangzhou.aliyuncs.com/ossrs/srs-cloud:platform-${{ env.SRS_TAG }}
# TODO: FIXME: If stable release, update it.
#registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:${{ env.SRS_MAJOR }}
#registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:v${{ env.SRS_MAJOR }}
#registry.cn-hangzhou.aliyuncs.com/ossrs/srs-cloud:${{ env.SRS_MAJOR }}
#registry.cn-hangzhou.aliyuncs.com/ossrs/srs-cloud:v${{ env.SRS_MAJOR }}
#registry.cn-hangzhou.aliyuncs.com/ossrs/srs-cloud:platform-${{ env.SRS_MAJOR }}
#registry.cn-hangzhou.aliyuncs.com/ossrs/srs-cloud:platform-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=srs_stack.zip
# SRS_BT_SOURCE_MD5=83e38700a80a26e30b2df054e69956e5
# SRS_SOURCE_PATH=/tmp/srs_stack-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-srs_stack.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-srs_stack.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-srs_stack-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-srs_stack-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/srs_stack-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 SRS Stack ${{ env.SRS_TAG }}
body: |
[${{ github.event.head_commit.message }}](https://github.com/ossrs/srs-stack/commit/${{ github.sha }})
## English
* [docker pull ossrs/srs-stack:5](https://ossrs.io/lts/en-us/docs/v5/doc/getting-started-stack#docker)
* [docker pull ossrs/srs-stack:${{ 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/srs-stack/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/srs-stack/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_AAPANEL_SOURCE_FILE }})
* [Changelog](https://ossrs.io/lts/en-us/faq-srs-stack#changelog)
* [Features](https://ossrs.io/lts/en-us/faq-srs-stack#features)
## Chinese
* [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack:${{ 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/srs-stack/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/srs-stack/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/srs-stack/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_AAPANEL_SOURCE_FILE }})
* [Changelog](https://ossrs.net/lts/zh-cn/faq-srs-stack#changelog)
* [Features](https://ossrs.net/lts/zh-cn/faq-srs-stack#features)
# TODO: FIXME: If stable release, update it.
## English
#* [docker pull ossrs/srs-stack:5](https://ossrs.io/lts/en-us/docs/v5/doc/getting-started-stack#docker)
## Chinese
#* [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs-stack: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