mirror of
				https://github.com/langhuihui/monibuca.git
				synced 2025-10-31 07:36:23 +08:00 
			
		
		
		
	Compare commits
	
		
			3 Commits
		
	
	
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
|   | 9e876fb424 | ||
|   | 7533d83ae7 | ||
|   | 69a61a77bd | 
							
								
								
									
										90
									
								
								.github/workflows/go.yml
									
									
									
									
										vendored
									
									
										
										
										Normal file → Executable file
									
								
							
							
						
						
									
										90
									
								
								.github/workflows/go.yml
									
									
									
									
										vendored
									
									
										
										
										Normal file → Executable file
									
								
							| @@ -3,90 +3,62 @@ name: Go | |||||||
| on: | on: | ||||||
|   create: |   create: | ||||||
|     tags: |     tags: | ||||||
|       - v* |       - v3* | ||||||
| jobs: | jobs: | ||||||
|  |  | ||||||
|   build: |   build: | ||||||
|     runs-on: ubuntu-latest |     runs-on: ubuntu-latest | ||||||
|     steps: |     steps: | ||||||
|     - uses: actions/checkout@v2 |     - uses: actions/checkout@v2 | ||||||
|  |       with: | ||||||
|  |           fetch-depth: 1 | ||||||
|  |  | ||||||
|     - name: Set up Go |     - name: Set up Go | ||||||
|       uses: actions/setup-go@v2 |       uses: actions/setup-go@v2 | ||||||
|       with: |       with: | ||||||
|         go-version: 1.16 |         go-version: 1.16 | ||||||
|  |  | ||||||
|     - name: Build |     - name: Cache Go modules | ||||||
|       run: go build -o m7s_linux_x86_64 |       uses: actions/cache@v1 | ||||||
|  |       with: | ||||||
|  |         path: ~/go/pkg/mod | ||||||
|  |         key: runner.os−go−{ { hashFiles('**/go.sum') } } | ||||||
|  |         restore-keys: ${{ runner.os }}-go-         | ||||||
|  |  | ||||||
|     - name: Tar |     - name: Run GoReleaser | ||||||
|       run: tar -zcvf linux.tgz m7s_linux_x86_64 config.toml |       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 |     - name: Deploy Windows | ||||||
|       uses: garygrossgarten/github-action-scp@release |       uses: garygrossgarten/github-action-scp@release | ||||||
|       with: |       with: | ||||||
|           local: /home/runner/work/monibuca/monibuca/linux.tgz |         local: dist/m7s_${GITHUB_REF:11}_windows_amd64.tar.gz | ||||||
|           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 |         remote: /opt/dexter/windows.tgz | ||||||
|         host: monibuca.com |         host: monibuca.com | ||||||
|         username: root |         username: root | ||||||
|         privateKey: ${{ secrets.PEM }} |         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 |  | ||||||
|  |  | ||||||
|     - name: Set up Go |     - name: Deploy Mac | ||||||
|       uses: actions/setup-go@v2 |  | ||||||
|       with: |  | ||||||
|         go-version: 1.16 |  | ||||||
|  |  | ||||||
|     - name: Build |  | ||||||
|       run: go build -o m7s_darwin_x86_64 |  | ||||||
|  |  | ||||||
|     - name: Tar |  | ||||||
|       run: tar -zcvf mac.tgz m7s_darwin_x86_64 config.toml |  | ||||||
|  |  | ||||||
|     - name: Deploy |  | ||||||
|       uses: garygrossgarten/github-action-scp@release |       uses: garygrossgarten/github-action-scp@release | ||||||
|       with: |       with: | ||||||
|           local: /Users/runner/work/monibuca/monibuca/mac.tgz |         local: dist/m7s_${GITHUB_REF:11}_darwin_amd64.tar.gz | ||||||
|         remote: /opt/dexter/mac.tgz |         remote: /opt/dexter/mac.tgz | ||||||
|         host: monibuca.com |         host: monibuca.com | ||||||
|         username: root |         username: root | ||||||
|         privateKey: ${{ secrets.PEM }}		   |         privateKey: ${{ secrets.PEM }}		   | ||||||
|     - name: Release |  | ||||||
|       uses: softprops/action-gh-release@v1 |     - name: Deploy Linux | ||||||
|  |       uses: garygrossgarten/github-action-scp@release | ||||||
|       with: |       with: | ||||||
|           files: "mac.tgz" |         local: dist/m7s_${GITHUB_REF:11}_linux_amd64.tar.gz | ||||||
|  |         remote: /opt/dexter/linux.tgz | ||||||
|  |         host: monibuca.com | ||||||
|  |         username: root | ||||||
|  |         privateKey: ${{ secrets.PEM }} | ||||||
|  |          | ||||||
|  |           | ||||||
|   | |||||||
							
								
								
									
										35
									
								
								goreleaser.yml
									
									
									
									
									
										Executable file
									
								
							
							
						
						
									
										35
									
								
								goreleaser.yml
									
									
									
									
									
										Executable file
									
								
							| @@ -0,0 +1,35 @@ | |||||||
|  | project_name: m7s | ||||||
|  | archives: | ||||||
|  |   - | ||||||
|  |     files: | ||||||
|  |       - config.toml | ||||||
|  | builds: | ||||||
|  |   - env: [CGO_ENABLED=0] | ||||||
|  |     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 | ||||||
		Reference in New Issue
	
	Block a user