-
-
Notifications
You must be signed in to change notification settings - Fork 247
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c161674
commit b3a3e37
Showing
220 changed files
with
36,494 additions
and
56 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# These are supported funding model platforms | ||
|
||
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2] | ||
patreon: # Replace with a single Patreon username | ||
open_collective: monibuca | ||
ko_fi: # Replace with a single Ko-fi username | ||
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel | ||
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry | ||
liberapay: # Replace with a single Liberapay username | ||
issuehunt: # Replace with a single IssueHunt username | ||
otechie: # Replace with a single Otechie username | ||
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry | ||
custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: | ||
- v5 | ||
env: | ||
dest: bin | ||
jobs: | ||
|
||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 1 | ||
|
||
- name: Set up Env | ||
run: echo "version=${GITHUB_REF:11}" >> $GITHUB_ENV | ||
- name: Set beta | ||
if: contains(env.version, 'beta') | ||
run: echo "dest=beta" >> $GITHUB_ENV | ||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: 1.23.4 | ||
|
||
- name: Cache Go modules | ||
uses: actions/cache@v1 | ||
with: | ||
path: ~/go/pkg/mod | ||
key: runner.os−go−{ { hashFiles('**/go.sum') } } | ||
restore-keys: ${{ runner.os }}-go- | ||
|
||
- name: Run GoReleaser | ||
uses: goreleaser/goreleaser-action@v2 | ||
if: success() && startsWith(github.ref, 'refs/tags/') | ||
with: | ||
version: v1.8.3 | ||
args: release --rm-dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
# - name: Checkout m7s-import | ||
# uses: actions/checkout@v3 | ||
# with: | ||
# repository: langhuihui/m7s-import | ||
# path: m7s-import | ||
# persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal access token. | ||
# fetch-depth: 0 | ||
|
||
# - name: Add bin to m7s-import | ||
# if: success() && startsWith(github.ref, 'refs/tags/') | ||
# run: | | ||
# cd m7s-import | ||
# mkdir -p apps/m7s-website/src/public/bin | ||
# cp ../dist/m7s_${{ env.version }}_windows_amd64.tar.gz apps/m7s-website/src/public/bin/m7s_windows_amd64.tar.gz | ||
# cp ../dist/m7s_${{ env.version }}_darwin_amd64.tar.gz apps/m7s-website/src/public/bin/m7s_darwin_amd64.tar.gz | ||
# cp ../dist/m7s_${{ env.version }}_darwin_arm64.tar.gz apps/m7s-website/src/public/bin/m7s_darwin_arm64.tar.gz | ||
# cp ../dist/m7s_${{ env.version }}_linux_amd64.tar.gz apps/m7s-website/src/public/bin/m7s_linux_amd64.tar.gz | ||
# cp ../dist/m7s_${{ env.version }}_linux_arm64.tar.gz apps/m7s-website/src/public/bin/m7s_linux_arm64.tar.gz | ||
# ls apps/m7s-website/src/public/bin | ||
- name: copy | ||
if: success() && startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
mkdir -p bin | ||
cp dist/m7s_${{ env.version }}_windows_amd64.tar.gz bin/m7s_windows_amd64.tar.gz | ||
cp dist/m7s_${{ env.version }}_darwin_amd64.tar.gz bin/m7s_darwin_amd64.tar.gz | ||
cp dist/m7s_${{ env.version }}_darwin_arm64.tar.gz bin/m7s_darwin_arm64.tar.gz | ||
cp dist/m7s_${{ env.version }}_linux_amd64.tar.gz bin/m7s_linux_amd64.tar.gz | ||
cp dist/m7s_${{ env.version }}_linux_arm64.tar.gz bin/m7s_linux_arm64.tar.gz | ||
ls bin | ||
- uses: jakejarvis/s3-sync-action@master | ||
# with: | ||
# args: --acl public-read --follow-symlinks --delete | ||
env: | ||
AWS_S3_ENDPOINT: https://${{ secrets.R2_DOMAIN }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.R2_KEY }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET }} | ||
AWS_S3_BUCKET: monibuca | ||
SOURCE_DIR: 'bin' | ||
DEST_DIR: ${{ env.dest }} | ||
- name: docker build | ||
if: success() && startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
tar -zxvf bin/m7s_linux_amd64.tar.gz | ||
mv m7s monibuca_linux | ||
docker login -u langhuihui -p ${{ secrets.DOCKER_PASSWORD }} | ||
docker build -t langhuihui/monibuca:v5 . | ||
docker push langhuihui/monibuca:v5 | ||
- name: docker push | ||
if: success() && !contains(env.version, 'beta') | ||
run: | | ||
docker tag langhuihui/monibuca:latest langhuihui/monibuca:${{ env.version }} | ||
docker push langhuihui/monibuca:${{ env.version }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
project_name: m7s | ||
archives: | ||
- | ||
files: | ||
- favicon.ico | ||
builds: | ||
- id: "all" | ||
main: ./example/default/main.go | ||
env: | ||
- CGO_ENABLED=0 | ||
tags: | ||
- sqlite | ||
ldflags: | ||
- -s -w -X main.version={{.Tag}} | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
goarch: | ||
- arm64 | ||
- amd64 | ||
hooks: | ||
pre: | ||
- go mod tidy |
Oops, something went wrong.