2
0

release.yml 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481
  1. name: "Release"
  2. # @see https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions#onpushpull_requestbranchestags
  3. on:
  4. push:
  5. tags:
  6. - v6*
  7. # For draft, need write permission.
  8. permissions:
  9. contents: write
  10. jobs:
  11. envs:
  12. name: envs
  13. steps:
  14. ##################################################################################################################
  15. # Git checkout
  16. - name: Checkout repository
  17. uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
  18. # The github.ref is, for example, refs/tags/v6.0.145 or refs/tags/v6.0-r8
  19. # Generate variables like:
  20. # SRS_TAG=v6.0-r8
  21. # SRS_TAG=v6.0.145
  22. # SRS_VERSION=6.0.145
  23. # SRS_VERSION=6.0-r8
  24. # SRS_MAJOR=6
  25. # SRS_XYZ=6.0.145
  26. # @see https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#setting-an-environment-variable
  27. - name: Generate varaiables
  28. run: |
  29. SRS_TAG=$(echo ${{ github.ref }}| awk -F '/' '{print $3}')
  30. echo "SRS_TAG=$SRS_TAG" >> $GITHUB_ENV
  31. SRS_VERSION=$(echo ${SRS_TAG}| sed 's/^v//g')
  32. echo "SRS_VERSION=$SRS_VERSION" >> $GITHUB_ENV
  33. SRS_MAJOR=$(echo $SRS_TAG| cut -c 2)
  34. echo "SRS_MAJOR=$SRS_MAJOR" >> $GITHUB_ENV
  35. VFILE="trunk/src/core/srs_core_version6.hpp"
  36. SRS_X=$(cat $VFILE |grep VERSION_MAJOR |awk '{print $3}')
  37. SRS_Y=$(cat $VFILE |grep VERSION_MINOR |awk '{print $3}')
  38. SRS_Z=$(cat $VFILE |grep VERSION_REVISION |awk '{print $3}')
  39. SRS_XYZ=$SRS_X.$SRS_Y.$SRS_Z
  40. echo "SRS_XYZ=$SRS_XYZ" >> $GITHUB_ENV
  41. # Map a step output to a job output, see https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs
  42. outputs:
  43. SRS_TAG: ${{ env.SRS_TAG }}
  44. SRS_VERSION: ${{ env.SRS_VERSION }}
  45. SRS_MAJOR: ${{ env.SRS_MAJOR }}
  46. SRS_XYZ: ${{ env.SRS_XYZ }}
  47. runs-on: ubuntu-20.04
  48. test:
  49. name: test
  50. needs:
  51. - envs
  52. steps:
  53. ##################################################################################################################
  54. - name: Covert output to env
  55. run: |
  56. echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV
  57. echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV
  58. echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV
  59. ##################################################################################################################
  60. # Git checkout
  61. - name: Checkout repository
  62. uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
  63. ##################################################################################################################
  64. # Tests
  65. - name: Build test image
  66. run: docker build --tag srs:test -f trunk/Dockerfile.test .
  67. # For utest
  68. - name: Run SRS utest
  69. run: docker run --rm srs:test bash -c 'make utest && ./objs/srs_utest'
  70. # For regression-test
  71. - name: Run SRS regression-test
  72. run: |
  73. docker run --rm srs:test bash -c 'make && \
  74. ./objs/srs -c conf/regression-test.conf && \
  75. cd 3rdparty/srs-bench && make && ./objs/srs_test -test.v'
  76. runs-on: ubuntu-20.04
  77. draft:
  78. name: draft
  79. needs:
  80. - envs
  81. steps:
  82. - name: Create release draft
  83. id: create_draft
  84. uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e # v1.12.0
  85. env:
  86. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  87. with:
  88. allowUpdates: true
  89. tag: ${{ github.ref }}
  90. draft: true
  91. prerelease: true
  92. # Map a step output to a job output, see https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs
  93. outputs:
  94. SRS_RELEASE_ID: ${{ steps.create_draft.outputs.id }}
  95. runs-on: ubuntu-20.04
  96. cygwin64:
  97. name: cygwin64
  98. needs:
  99. - envs
  100. - draft
  101. steps:
  102. # See https://github.com/cygwin/cygwin-install-action#parameters
  103. # Note that https://github.com/egor-tensin/setup-cygwin fails to install packages.
  104. - name: Setup Cygwin
  105. uses: cygwin/cygwin-install-action@006ad0b0946ca6d0a3ea2d4437677fa767392401 # master
  106. with:
  107. platform: x86_64
  108. packages: bash make gcc-g++ cmake automake patch pkg-config tcl unzip
  109. install-dir: C:\cygwin64
  110. ##################################################################################################################
  111. - name: Checkout repository
  112. uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
  113. ##################################################################################################################
  114. - name: Covert output to env
  115. env:
  116. SHELLOPTS: igncr
  117. shell: C:\cygwin64\bin\bash.exe --login '{0}'
  118. run: |
  119. echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV
  120. echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV
  121. echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV
  122. echo "SRS_RELEASE_ID=${{ needs.draft.outputs.SRS_RELEASE_ID }}" >> $GITHUB_ENV
  123. ##################################################################################################################
  124. - name: Build SRS
  125. env:
  126. SHELLOPTS: igncr
  127. SRS_WORKSPACE: ${{ github.workspace }}
  128. shell: C:\cygwin64\bin\bash.exe --login '{0}'
  129. run: |
  130. export PATH=/usr/bin:/usr/local/bin &&
  131. which make gcc g++ patch cmake pkg-config uname grep sed &&
  132. (make --version; gcc --version; patch --version; cmake --version; pkg-config --version) &&
  133. (aclocal --version; autoconf --version; automake --version; uname -a) &&
  134. cd $(cygpath -u $SRS_WORKSPACE)/trunk && ./configure --gb28181=on --h265=on && make
  135. ##################################################################################################################
  136. - name: Package SRS
  137. env:
  138. SHELLOPTS: igncr
  139. SRS_WORKSPACE: ${{ github.workspace }}
  140. shell: C:\cygwin64\bin\bash.exe --login '{0}'
  141. run: |
  142. cd $(cygpath -u $SRS_WORKSPACE) &&
  143. if [[ $(echo $SRS_TAG |grep -qE '^v' && echo YES) != YES ]]; then
  144. SRS_VERSION=$(./trunk/objs/srs -v 2>&1); echo "Change version to ${SRS_VERSION}";
  145. fi &&
  146. "/cygdrive/c/Program Files (x86)/NSIS/makensis.exe" /DSRS_VERSION=${SRS_VERSION} \
  147. /DCYGWIN_DIR="C:\cygwin64" trunk/packaging/nsis/srs.nsi &&
  148. mv trunk/packaging/nsis/SRS-Windows-x86_64-${SRS_VERSION}-setup.exe . && ls -lh *.exe &&
  149. echo "SRS_CYGWIN_TAR=SRS-Windows-x86_64-${SRS_VERSION}-setup.exe" >> $GITHUB_ENV &&
  150. echo "SRS_CYGWIN_MD5=$(md5sum SRS-Windows-x86_64-${SRS_VERSION}-setup.exe| awk '{print $1}')" >> $GITHUB_ENV
  151. ##################################################################################################################
  152. - name: Upload Release Assets Cygwin
  153. id: upload-release-assets-cygwin
  154. uses: dwenegar/upload-release-assets@5bc3024cf83521df8ebfadf00ad0c4614fd59148 # v1
  155. env:
  156. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  157. with:
  158. release_id: ${{ env.SRS_RELEASE_ID }}
  159. assets_path: ${{ env.SRS_CYGWIN_TAR }}
  160. # Map a step output to a job output, see https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs
  161. outputs:
  162. SRS_CYGWIN_TAR: ${{ env.SRS_CYGWIN_TAR }}
  163. SRS_CYGWIN_MD5: ${{ env.SRS_CYGWIN_MD5 }}
  164. runs-on: windows-latest
  165. linux:
  166. name: linux
  167. needs:
  168. - envs
  169. - draft
  170. steps:
  171. ##################################################################################################################
  172. - name: Covert output to env
  173. run: |
  174. echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV
  175. echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV
  176. echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV
  177. echo "SRS_RELEASE_ID=${{ needs.draft.outputs.SRS_RELEASE_ID }}" >> $GITHUB_ENV
  178. ##################################################################################################################
  179. # Git checkout
  180. - name: Checkout repository
  181. uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
  182. ##################################################################################################################
  183. # Create source tar for release. Note that it's for OpenWRT package srs-server, so the filename MUST be
  184. # srs-server-xxx.tar.gz, because the package is named srs-server.
  185. # Generate variables like:
  186. # SRS_SOURCE_TAR=srs-server-6.0.145.tar.gz
  187. # SRS_SOURCE_MD5=83e38700a80a26e30b2df054e69956e5
  188. - name: Create source tar.gz
  189. run: |
  190. DEST_DIR=srs-server-$SRS_VERSION && mkdir -p $DEST_DIR &&
  191. cp README.md $DEST_DIR && cp LICENSE $DEST_DIR && cp -R trunk $DEST_DIR/trunk &&
  192. (cd $DEST_DIR/trunk/3rdparty && rm -rf *.zip openssl-*.gz srs-bench) &&
  193. tar zcf ${DEST_DIR}.tar.gz ${DEST_DIR} && du -sh ${DEST_DIR}* && rm -rf ${DEST_DIR} &&
  194. echo "SRS_SOURCE_TAR=${DEST_DIR}.tar.gz" >> $GITHUB_ENV &&
  195. echo "SRS_SOURCE_MD5=$(md5sum ${DEST_DIR}.tar.gz| awk '{print $1}')" >> $GITHUB_ENV
  196. # Create package tar for release
  197. # Generate variables like:
  198. # SRS_PACKAGE_ZIP=SRS-CentOS7-x86_64-6.0.145.zip
  199. # SRS_PACKAGE_MD5=3880a26e30b283edf05700a4e69956e5
  200. - name: Create package zip
  201. env:
  202. PACKAGER: ${{ secrets.SRS_PACKAGER_BINARY }}
  203. run: |
  204. docker build --tag srs:pkg --build-arg version=$SRS_VERSION --build-arg SRS_AUTO_PACKAGER=$PACKAGER -f trunk/Dockerfile.pkg . &&
  205. SRS_PACKAGE_ZIP=SRS-CentOS7-x86_64-$SRS_VERSION.zip &&
  206. docker run --rm -v $(pwd):/output srs:pkg cp objs/$SRS_PACKAGE_ZIP /output/ &&
  207. du -sh $SRS_PACKAGE_ZIP &&
  208. echo "SRS_PACKAGE_ZIP=$SRS_PACKAGE_ZIP" >> $GITHUB_ENV &&
  209. echo "SRS_PACKAGE_MD5=$(md5sum $SRS_PACKAGE_ZIP| awk '{print $1}')" >> $GITHUB_ENV
  210. ##################################################################################################################
  211. - name: Upload Release Assets Packager
  212. id: upload-release-assets-packager
  213. uses: dwenegar/upload-release-assets@5bc3024cf83521df8ebfadf00ad0c4614fd59148 # v1
  214. env:
  215. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  216. with:
  217. release_id: ${{ env.SRS_RELEASE_ID }}
  218. assets_path: ${{ env.SRS_PACKAGE_ZIP }}
  219. - name: Upload Release Assets Source
  220. id: upload-release-assets-source
  221. uses: dwenegar/upload-release-assets@5bc3024cf83521df8ebfadf00ad0c4614fd59148 # v1
  222. env:
  223. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  224. with:
  225. release_id: ${{ env.SRS_RELEASE_ID }}
  226. assets_path: ${{ env.SRS_SOURCE_TAR }}
  227. # Map a step output to a job output, see https://docs.github.com/en/actions/using-jobs/defining-outputs-for-jobs
  228. outputs:
  229. SRS_PACKAGE_ZIP: ${{ env.SRS_PACKAGE_ZIP }}
  230. SRS_PACKAGE_MD5: ${{ env.SRS_PACKAGE_MD5 }}
  231. SRS_SOURCE_TAR: ${{ env.SRS_SOURCE_TAR }}
  232. SRS_SOURCE_MD5: ${{ env.SRS_SOURCE_MD5 }}
  233. runs-on: ubuntu-20.04
  234. docker-srs:
  235. name: docker-srs
  236. needs:
  237. - envs
  238. steps:
  239. ##################################################################################################################
  240. - name: Covert output to env
  241. run: |
  242. echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV
  243. echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV
  244. echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV
  245. echo "SRS_XYZ=${{ needs.envs.outputs.SRS_XYZ }}" >> $GITHUB_ENV
  246. ##################################################################################################################
  247. # Git checkout
  248. - name: Checkout repository
  249. uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
  250. # See https://github.com/crazy-max/ghaction-docker-buildx#moved-to-docker-organization
  251. # https://github.com/docker/setup-qemu-action
  252. - name: Set up QEMU
  253. uses: docker/setup-qemu-action@e81a89b1732b9c48d79cd809d8d81d79c4647a18 # v2.1.0
  254. # https://github.com/docker/setup-buildx-action
  255. - name: Set up Docker Buildx
  256. uses: docker/setup-buildx-action@8c0edbc76e98fa90f69d9a2c020dcb50019dc325 # v2.2.1
  257. ##################################################################################################################
  258. # Create main images for Docker
  259. - name: Login to docker hub
  260. uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
  261. with:
  262. username: "${{ secrets.DOCKER_USERNAME }}"
  263. password: "${{ secrets.DOCKER_PASSWORD }}"
  264. - name: Build and push images to Docker hub
  265. env:
  266. PACKAGER: ${{ secrets.SRS_PACKAGER_DOCKER }}
  267. run: |
  268. echo "Release ossrs/srs:$SRS_TAG"
  269. docker buildx build --platform linux/arm/v7,linux/arm64/v8,linux/amd64 \
  270. --output "type=image,push=true" \
  271. -t ossrs/srs:$SRS_TAG --build-arg SRS_AUTO_PACKAGER=$PACKAGER \
  272. --build-arg CONFARGS='--sanitizer=off --gb28181=on' \
  273. -f Dockerfile .
  274. # Docker alias images
  275. # TODO: FIXME: If stable, please set the latest from 5.0 to 6.0
  276. - name: Docker alias images for ossrs/srs
  277. uses: akhilerm/tag-push-action@85bf542f43f5f2060ef76262a67ee3607cb6db37 # v2.1.0
  278. with:
  279. src: ossrs/srs:${{ env.SRS_TAG }}
  280. dst: |
  281. ossrs/srs:${{ env.SRS_VERSION }}
  282. ossrs/srs:${{ env.SRS_MAJOR }}
  283. ossrs/srs:v${{ env.SRS_MAJOR }}
  284. ossrs/srs:${{ env.SRS_XYZ }}
  285. ossrs/srs:v${{ env.SRS_XYZ }}
  286. runs-on: ubuntu-20.04
  287. aliyun-srs:
  288. name: aliyun-srs
  289. needs:
  290. - envs
  291. - docker-srs
  292. - test
  293. steps:
  294. ##################################################################################################################
  295. - name: Covert output to env
  296. run: |
  297. echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV
  298. echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV
  299. echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV
  300. echo "SRS_XYZ=${{ needs.envs.outputs.SRS_XYZ }}" >> $GITHUB_ENV
  301. # Aliyun ACR
  302. # TODO: FIXME: If stable, please set the latest from 5.0 to 6.0
  303. - name: Login aliyun hub
  304. uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a # v2.1.0
  305. with:
  306. registry: registry.cn-hangzhou.aliyuncs.com
  307. username: "${{ secrets.ACR_USERNAME }}"
  308. password: "${{ secrets.ACR_PASSWORD }}"
  309. - name: Push to Aliyun registry for ossrs/srs
  310. uses: akhilerm/tag-push-action@85bf542f43f5f2060ef76262a67ee3607cb6db37 # v2.1.0
  311. with:
  312. src: ossrs/srs:${{ env.SRS_TAG }}
  313. dst: |
  314. registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_TAG }}
  315. registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_VERSION }}
  316. registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_MAJOR }}
  317. registry.cn-hangzhou.aliyuncs.com/ossrs/srs:v${{ env.SRS_MAJOR }}
  318. registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_XYZ }}
  319. registry.cn-hangzhou.aliyuncs.com/ossrs/srs:v${{ env.SRS_XYZ }}
  320. runs-on: ubuntu-20.04
  321. update:
  322. name: update
  323. needs:
  324. - aliyun-srs
  325. - envs
  326. steps:
  327. ##################################################################################################################
  328. - name: Covert output to env
  329. run: |
  330. echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV
  331. echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV
  332. echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV
  333. ##################################################################################################################
  334. # Git checkout
  335. - name: Checkout repository
  336. uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
  337. ##################################################################################################################
  338. # Generate variables like:
  339. # SRS_LH_OSSRS_NET=1.2.3.4
  340. - name: Build variables for lh.ossrs.net
  341. run: |
  342. SRS_LH_OSSRS_NET=$(dig +short lh.ossrs.net)
  343. SRS_D_OSSRS_NET=$(dig +short d.ossrs.net)
  344. echo "SRS_LH_OSSRS_NET=$SRS_LH_OSSRS_NET" >> $GITHUB_ENV
  345. echo "SRS_D_OSSRS_NET=$SRS_D_OSSRS_NET" >> $GITHUB_ENV
  346. - name: Release to lh.ossrs.net
  347. uses: appleboy/ssh-action@c1965ddd2563844fddc1ec01cafc798365706143 # master
  348. with:
  349. host: ${{ env.SRS_LH_OSSRS_NET }}
  350. username: root
  351. key: ${{ secrets.DIGITALOCEAN_SSHKEY }}
  352. port: 22
  353. envs: SRS_MAJOR
  354. timeout: 60s
  355. command_timeout: 30m
  356. script: |
  357. docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:$SRS_MAJOR
  358. docker rm -f srs-dev
  359. #
  360. # Cleanup old docker images.
  361. for image in $(docker images |grep '<none>' |awk '{print $3}'); do
  362. docker rmi -f $image
  363. echo "Remove image $image, r0=$?"
  364. done
  365. - name: Release to d.ossrs.net
  366. uses: appleboy/ssh-action@c1965ddd2563844fddc1ec01cafc798365706143 # master
  367. with:
  368. host: ${{ env.SRS_D_OSSRS_NET }}
  369. username: root
  370. key: ${{ secrets.DIGITALOCEAN_SSHKEY }}
  371. port: 22
  372. envs: SRS_MAJOR
  373. timeout: 60s
  374. command_timeout: 30m
  375. script: |
  376. docker pull ossrs/srs:$SRS_MAJOR
  377. docker rm -f srs-dev
  378. #
  379. # Cleanup old docker images.
  380. for image in $(docker images |grep '<none>' |awk '{print $3}'); do
  381. docker rmi -f $image
  382. echo "Remove image $image, r0=$?"
  383. done
  384. runs-on: ubuntu-20.04
  385. release:
  386. name: release
  387. needs:
  388. - update
  389. - envs
  390. - draft
  391. - cygwin64
  392. - linux
  393. steps:
  394. ##################################################################################################################
  395. - name: Covert output to env
  396. run: |
  397. echo "SRS_TAG=${{ needs.envs.outputs.SRS_TAG }}" >> $GITHUB_ENV
  398. echo "SRS_VERSION=${{ needs.envs.outputs.SRS_VERSION }}" >> $GITHUB_ENV
  399. echo "SRS_MAJOR=${{ needs.envs.outputs.SRS_MAJOR }}" >> $GITHUB_ENV
  400. echo "SRS_XYZ=${{ needs.envs.outputs.SRS_XYZ }}" >> $GITHUB_ENV
  401. echo "SRS_RELEASE_ID=${{ needs.draft.outputs.SRS_RELEASE_ID }}" >> $GITHUB_ENV
  402. echo "SRS_PACKAGE_ZIP=${{ needs.linux.outputs.SRS_PACKAGE_ZIP }}" >> $GITHUB_ENV
  403. echo "SRS_PACKAGE_MD5=${{ needs.linux.outputs.SRS_PACKAGE_MD5 }}" >> $GITHUB_ENV
  404. echo "SRS_SOURCE_TAR=${{ needs.linux.outputs.SRS_SOURCE_TAR }}" >> $GITHUB_ENV
  405. echo "SRS_SOURCE_MD5=${{ needs.linux.outputs.SRS_SOURCE_MD5 }}" >> $GITHUB_ENV
  406. echo "SRS_CYGWIN_TAR=${{ needs.cygwin64.outputs.SRS_CYGWIN_TAR }}" >> $GITHUB_ENV
  407. echo "SRS_CYGWIN_MD5=${{ needs.cygwin64.outputs.SRS_CYGWIN_MD5 }}" >> $GITHUB_ENV
  408. ##################################################################################################################
  409. # Git checkout
  410. - name: Checkout repository
  411. uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c # v3.3.0
  412. # Create release.
  413. # TODO: FIXME: Refine the release when 6.0 released
  414. # TODO: FIXME: Change prerelease to false and makeLatest to true when 6.0 released
  415. - name: Update release
  416. id: update_release
  417. uses: ncipollo/release-action@a2e71bdd4e7dab70ca26a852f29600c98b33153e # v1.12.0
  418. env:
  419. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  420. with:
  421. allowUpdates: true
  422. tag: ${{ github.ref }}
  423. name: Release ${{ env.SRS_TAG }}
  424. body: |
  425. If you would like to support SRS, please consider contributing to our [OpenCollective](https://opencollective.com/srs-server).
  426. [${{ github.sha }}](https://github.com/ossrs/srs/commit/${{ github.sha }})
  427. ${{ github.event.head_commit.message }}
  428. ## Resource
  429. * Source: ${{ env.SRS_SOURCE_MD5 }} [${{ env.SRS_SOURCE_TAR }}](https://github.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_SOURCE_TAR }})
  430. * Binary: ${{ env.SRS_PACKAGE_MD5 }} [${{ env.SRS_PACKAGE_ZIP }}](https://github.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_PACKAGE_ZIP }})
  431. * Binary: ${{ env.SRS_CYGWIN_MD5 }} [${{ env.SRS_CYGWIN_TAR }}](https://github.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_CYGWIN_TAR }})
  432. ## Resource Mirror: gitee.com
  433. * Source: ${{ env.SRS_SOURCE_MD5 }} [${{ env.SRS_SOURCE_TAR }}](https://gitee.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_SOURCE_TAR }})
  434. * Binary: ${{ env.SRS_PACKAGE_MD5 }} [${{ env.SRS_PACKAGE_ZIP }}](https://gitee.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_PACKAGE_ZIP }})
  435. * Binary: ${{ env.SRS_CYGWIN_MD5 }} [${{ env.SRS_CYGWIN_TAR }}](https://gitee.com/ossrs/srs/releases/download/${{ env.SRS_TAG }}/${{ env.SRS_CYGWIN_TAR }})
  436. ## Docker
  437. * [docker pull ossrs/srs:${{ env.SRS_MAJOR }}](https://ossrs.io/lts/en-us/docs/v6/doc/getting-started)
  438. * [docker pull ossrs/srs:${{ env.SRS_TAG }}](https://ossrs.io/lts/en-us/docs/v6/doc/getting-started)
  439. * [docker pull ossrs/srs:${{ env.SRS_XYZ }}](https://ossrs.io/lts/en-us/docs/v6/doc/getting-started)
  440. ## Docker Mirror: aliyun.com
  441. * [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_MAJOR }}](https://ossrs.net/lts/zh-cn/docs/v6/doc/getting-started)
  442. * [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_TAG }}](https://ossrs.net/lts/zh-cn/docs/v6/doc/getting-started)
  443. * [docker pull registry.cn-hangzhou.aliyuncs.com/ossrs/srs:${{ env.SRS_XYZ }}](https://ossrs.net/lts/zh-cn/docs/v6/doc/getting-started)
  444. ## Doc: ossrs.io
  445. * [Getting Started](https://ossrs.io/lts/en-us/docs/v6/doc/getting-started)
  446. * [Wiki home](https://ossrs.io/lts/en-us/docs/v6/doc/introduction)
  447. * [FAQ](https://ossrs.io/lts/en-us/faq), [Features](https://github.com/ossrs/srs/blob/${{ github.sha }}/trunk/doc/Features.md#features) or [ChangeLogs](https://github.com/ossrs/srs/blob/${{ github.sha }}/trunk/doc/CHANGELOG.md#changelog)
  448. ## Doc: ossrs.net
  449. * [快速入门](https://ossrs.net/lts/zh-cn/docs/v6/doc/getting-started)
  450. * [中文Wiki首页](https://ossrs.net/lts/zh-cn/docs/v6/doc/introduction)
  451. * [中文FAQ](https://ossrs.net/lts/zh-cn/faq), [功能列表](https://github.com/ossrs/srs/blob/${{ github.sha }}/trunk/doc/Features.md#features) 或 [修订历史](https://github.com/ossrs/srs/blob/${{ github.sha }}/trunk/doc/CHANGELOG.md#changelog)
  452. draft: false
  453. prerelease: true
  454. makeLatest: false
  455. runs-on: ubuntu-20.04
  456. release-done:
  457. runs-on: ubuntu-20.04
  458. needs:
  459. - update
  460. - release
  461. steps:
  462. - run: echo 'All done'