mirror of
https://github.com/bluenviron/mediamtx.git
synced 2025-12-24 12:01:56 -08:00
add release workflow
This commit is contained in:
parent
5e32a526e5
commit
baf7abc9a6
4 changed files with 64 additions and 5 deletions
4
.github/workflows/lint.yml
vendored
4
.github/workflows/lint.yml
vendored
|
|
@ -2,9 +2,9 @@ name: lint
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
lint:
|
||||
|
|
|
|||
57
.github/workflows/release.yml
vendored
Normal file
57
.github/workflows/release.yml
vendored
Normal file
|
|
@ -0,0 +1,57 @@
|
|||
name: release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
jobs:
|
||||
github:
|
||||
name: github
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- run: make release
|
||||
|
||||
- uses: actions/create-release@v1
|
||||
id: create_release
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
with:
|
||||
tag_name: ${{ github.ref }}
|
||||
release_name: ${{ github.ref }}
|
||||
|
||||
- uses: actions/github-script@v2
|
||||
env:
|
||||
RELEASE_ID: ${{ steps.create_release.outputs.id }}
|
||||
with:
|
||||
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
script: |
|
||||
const fs = require('fs').promises;
|
||||
const { repo: { owner, repo } } = context;
|
||||
|
||||
for (let file of await fs.readdir('./release/')) {
|
||||
await github.repos.uploadReleaseAsset({
|
||||
owner,
|
||||
repo,
|
||||
release_id: process.env.RELEASE_ID,
|
||||
name: file,
|
||||
data: await fs.readFile(`./release/${file}`)
|
||||
});
|
||||
}
|
||||
|
||||
dockerhub:
|
||||
name: dockerhub
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
||||
- run: make dockerhub
|
||||
env:
|
||||
DOCKER_USER: ${{ secrets.DOCKER_USER }}
|
||||
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
|
||||
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
|
|
@ -2,9 +2,9 @@ name: test
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [ master ]
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue