Compare commits

..

14 Commits

Author SHA1 Message Date
dexter
3b3ffc18aa Merge pull request #47 from dwdcth/3.0
3.0 去除windows arm64
2022-04-25 09:23:29 +08:00
dwdcth
938bd92dca ignore 2022-04-24 11:11:44 +08:00
dwdcth
0c10c07be1 去掉windows arm 2022-04-24 10:27:50 +08:00
dexter
65d6f5c33e Merge pull request #45 from dwdcth/HEAD
windows arm64
2022-04-24 09:39:35 +08:00
dwdcth
08c871653d windows arm64 2022-04-23 21:50:57 +08:00
dexter
8bae7cace2 自动编译修改go版本号到1.18 2022-04-22 19:42:04 +08:00
dexter
133bf6eaa3 更新gb插件和gateway插件 2022-04-22 19:34:26 +08:00
dexter
d2d09b0386 Merge pull request #41 from dwdcth/3.0
修复ci
2022-04-17 15:10:06 +08:00
banshan
668c1318c2 add arm 2022-04-17 14:46:00 +08:00
banshan
dc4cf67705 add arm 2022-04-17 14:39:33 +08:00
banshan
f3de8f2864 go.yml 2022-04-17 13:30:09 +08:00
dexter
9e876fb424 Update go.yml 2022-04-17 12:16:45 +08:00
dexter
7533d83ae7 Merge pull request #40 from dwdcth/3.0
goreleaser ci
2022-04-17 11:42:02 +08:00
dwdcth
69a61a77bd goreleaser ci 2022-04-13 16:54:34 +08:00
6 changed files with 113 additions and 79 deletions

138
.github/workflows/go.yml vendored Normal file → Executable file
View File

@@ -3,90 +3,84 @@ name: Go
on:
create:
tags:
- v*
- v3*
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Build
run: go build -o m7s_linux_x86_64
- name: Tar
run: tar -zcvf linux.tgz m7s_linux_x86_64 config.toml
- name: Deploy
uses: garygrossgarten/github-action-scp@release
with:
local: /home/runner/work/monibuca/monibuca/linux.tgz
remote: /opt/dexter/linux.tgz
host: monibuca.com
username: root
privateKey: ${{ secrets.PEM }}
- name: Release
uses: softprops/action-gh-release@v1
with:
files: "linux.tgz"
build2:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
- name: Build
run: go build -o m7s_x86_64.exe
- name: Tar
run: tar -zcvf windows.tgz m7s_x86_64.exe config.toml
- name: Deploy
uses: garygrossgarten/github-action-scp@release
with:
local: D:\\a\\monibuca\\monibuca\\windows.tgz
remote: /opt/dexter/windows.tgz
host: monibuca.com
username: root
privateKey: ${{ secrets.PEM }}
- name: Release
uses: softprops/action-gh-release@v1
with:
files: "windows.tgz"
build3:
runs-on: macos-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 1
- name: Set up Env
run: echo "version=${GITHUB_REF:11}" >> $GITHUB_ENV
- name: Set up Go
uses: actions/setup-go@v2
with:
go-version: 1.16
go-version: 1.18
- name: Build
run: go build -o m7s_darwin_x86_64
- name: Cache Go modules
uses: actions/cache@v1
with:
path: ~/go/pkg/mod
key: runner.osgo{ { hashFiles('**/go.sum') } }
restore-keys: ${{ runner.os }}-go-
- name: Tar
run: tar -zcvf mac.tgz m7s_darwin_x86_64 config.toml
- name: Deploy
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
if: success() && startsWith(github.ref, 'refs/tags/')
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Deploy Windows
uses: garygrossgarten/github-action-scp@release
with:
local: /Users/runner/work/monibuca/monibuca/mac.tgz
remote: /opt/dexter/mac.tgz
host: monibuca.com
username: root
privateKey: ${{ secrets.PEM }}
- name: Release
uses: softprops/action-gh-release@v1
local: dist/m7s_${{ env.version }}_windows_amd64.tar.gz
remote: /opt/dexter/windows.tgz
host: monibuca.com
username: root
privateKey: ${{ secrets.PEM }}
- name: Deploy Mac
uses: garygrossgarten/github-action-scp@release
with:
files: "mac.tgz"
local: dist/m7s_${{ env.version }}_darwin_amd64.tar.gz
remote: /opt/dexter/mac.tgz
host: monibuca.com
username: root
privateKey: ${{ secrets.PEM }}
- name: Deploy Mac arm64
uses: garygrossgarten/github-action-scp@release
with:
local: dist/m7s_${{ env.version }}_darwin_arm64.tar.gz
remote: /opt/dexter/mac_arm64.tgz
host: monibuca.com
username: root
privateKey: ${{ secrets.PEM }}
- name: Deploy Linux
uses: garygrossgarten/github-action-scp@release
with:
local: dist/m7s_${{ env.version }}_linux_amd64.tar.gz
remote: /opt/dexter/linux.tgz
host: monibuca.com
username: root
privateKey: ${{ secrets.PEM }}
- name: Deploy Linux arm64
uses: garygrossgarten/github-action-scp@release
with:
local: dist/m7s_${{ env.version }}_linux_arm64.tar.gz
remote: /opt/dexter/linux_arm64.tgz
host: monibuca.com
username: root
privateKey: ${{ secrets.PEM }}

4
.gitignore vendored
View File

@@ -7,4 +7,6 @@ resource
node_modules
shutdown.bat
shutdown.sh
.m7s
.m7s
debug.go
dist/

4
go.mod
View File

@@ -4,8 +4,8 @@ go 1.16
require (
github.com/Monibuca/engine/v3 v3.5.1
github.com/Monibuca/plugin-gateway/v3 v3.0.13
github.com/Monibuca/plugin-gb28181/v3 v3.0.7
github.com/Monibuca/plugin-gateway/v3 v3.0.14
github.com/Monibuca/plugin-gb28181/v3 v3.0.8
github.com/Monibuca/plugin-hdl/v3 v3.0.7
github.com/Monibuca/plugin-hls/v3 v3.0.6
github.com/Monibuca/plugin-jessica/v3 v3.0.0

8
go.sum
View File

@@ -7,10 +7,10 @@ github.com/Monibuca/engine/v3 v3.4.5/go.mod h1:Dik9pFxU9TFI5vj8Sv5QXZM+ooCs2fm9P
github.com/Monibuca/engine/v3 v3.5.0/go.mod h1:yNiVKeHxgv+Ez+f2RHXMkXoa5Oxv+G7Ch+MJdHi7ing=
github.com/Monibuca/engine/v3 v3.5.1 h1:3AX+FwxerMw3JuyGXIOd/1dYCjA3IzWLKH/zq/GWe20=
github.com/Monibuca/engine/v3 v3.5.1/go.mod h1:yNiVKeHxgv+Ez+f2RHXMkXoa5Oxv+G7Ch+MJdHi7ing=
github.com/Monibuca/plugin-gateway/v3 v3.0.13 h1:/RdKU//3bsbnWMlMYcN0RIpuTetBUcD+OYD2U3AfjJw=
github.com/Monibuca/plugin-gateway/v3 v3.0.13/go.mod h1:Pw5seYubBswGoF4knryLbLp6qrkYPwg3a7ZupgOir/4=
github.com/Monibuca/plugin-gb28181/v3 v3.0.7 h1:sa89DEGBa/eTmwSmR2XDoe8xjrUgKaGiZHNC7seX1MQ=
github.com/Monibuca/plugin-gb28181/v3 v3.0.7/go.mod h1:EIu6vD1irPweLcA+1dC4k05wVe6ygYn6ErMfEx+UYPo=
github.com/Monibuca/plugin-gateway/v3 v3.0.14 h1:gCQyOmdhOSNi8SMPcm11eT2P/Qi1tPzOaAX450F/gK4=
github.com/Monibuca/plugin-gateway/v3 v3.0.14/go.mod h1:Pw5seYubBswGoF4knryLbLp6qrkYPwg3a7ZupgOir/4=
github.com/Monibuca/plugin-gb28181/v3 v3.0.8 h1:UMLoxZfIqsyV/vBldx0lt0LU5i2jvlMB8Yboms9vvKA=
github.com/Monibuca/plugin-gb28181/v3 v3.0.8/go.mod h1:EIu6vD1irPweLcA+1dC4k05wVe6ygYn6ErMfEx+UYPo=
github.com/Monibuca/plugin-hdl/v3 v3.0.7 h1:caNQwYzOVYgAxGksTEYVey9LW/7v1VlvgwSYqANHlZ0=
github.com/Monibuca/plugin-hdl/v3 v3.0.7/go.mod h1:ImBolaupuPvXGoWD5hOUUMvSPPuzrg2lzVWqhcXmdVA=
github.com/Monibuca/plugin-hls/v3 v3.0.6 h1:WfM9BeTnezQJK6WmC40A3yyxXXGFqJNMePvcjKtYa+M=

38
goreleaser.yml Executable file
View File

@@ -0,0 +1,38 @@
project_name: m7s
archives:
-
files:
- config.toml
builds:
- env: [CGO_ENABLED=0]
ignore:
- goos: windows
goarch: arm64
goos:
- linux
- windows
- darwin
goarch:
- amd64
- arm64
#dockers:
# - image_templates: ["ghcr.io/goreleaser/example:{{ .Version }}"]
# dockerfile: Dockerfile
# build_flag_templates:
# - --label=org.opencontainers.image.title={{ .ProjectName }}
# - --label=org.opencontainers.image.description={{ .ProjectName }}
# - --label=org.opencontainers.image.url=https://github.com/goreleaser/example
# - --label=org.opencontainers.image.source=https://github.com/goreleaser/example
# - --label=org.opencontainers.image.version={{ .Version }}
# - --label=org.opencontainers.image.created={{ time "2006-01-02T15:04:05Z07:00" }}
# - --label=org.opencontainers.image.revision={{ .FullCommit }}
# - --label=org.opencontainers.image.licenses=MIT
#nfpms:
# - maintainer: Carlos A Becker <root@carlosbecker.dev>
# description: Sample project.
# homepage: https://github.com/caarlos0/tasktimer
# license: MIT
# formats:
# - deb
# - rpm
# - apk