Ready-to-use SRT / WebRTC / RTSP / RTMP / LL-HLS media server and media proxy that allows to read, publish, proxy, record and playback video and audio streams.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

88 lines
1.8 KiB

name: release
on:
push:
tags:
- 'v*'
jobs:
# make sure that gortsplib is updated
check_gortsplib:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "1.18"
- run: |
sed -i '/gortsplib/d' go.mod
go mod download
go mod tidy
git diff --exit-code
github:
needs: check_gortsplib
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: make binaries
- uses: actions/github-script@v6
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const fs = require('fs').promises;
const { repo: { owner, repo } } = context;
const currentRelease = context.ref.split('/')[2];
const res = await github.rest.repos.createRelease({
owner,
repo,
tag_name: currentRelease,
name: currentRelease,
});
const release_id = res.data.id;
for (const name of await fs.readdir('./binaries/')) {
await github.rest.repos.uploadReleaseAsset({
owner,
repo,
release_id,
name,
data: await fs.readFile(`./binaries/${name}`),
});
}
dockerhub:
needs: check_gortsplib
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: make dockerhub
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
apidocs:
needs: check_gortsplib
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- run: make apidocs-gen
- run: mv apidocs/*.html apidocs/index.html
- uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./apidocs