mirror of
https://github.com/GopeedLab/gopeed.git
synced 2026-11-15 21:03:41 +00:00
ci: release on master branch
This commit is contained in:
1 parent
4eda5a3e76
commit
bd585309bf
2 files changed
+11
-5
No files matched your search
@@ -3,12 +3,16 @@ name: release
|
|||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- master
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
|
- uses: actions/setup-go@v2
|
||||||
|
with:
|
||||||
|
go-version: '^1.15.2'
|
||||||
|
- uses: actions/checkout@v2
|
||||||
- name: Build Cli
|
- name: Build Cli
|
||||||
run: |
|
run: |
|
||||||
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-w -s" -o gopeed.exe cmd/gopeed/*
|
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-w -s" -o gopeed.exe cmd/gopeed/*
|
||||||
@@ -21,7 +25,7 @@ jobs:
|
|||||||
id: create_release
|
id: create_release
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
- name: Upload Cli windows
|
- name: Upload Cli Windows
|
||||||
uses: actions/[email protected]
|
uses: actions/[email protected]
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -30,7 +34,7 @@ jobs:
|
|||||||
asset_path: ./gopeed-windows-x64.zip
|
asset_path: ./gopeed-windows-x64.zip
|
||||||
asset_name: gopeed-${{ steps.create_release.outputs.name }}-windows-x64.zip
|
asset_name: gopeed-${{ steps.create_release.outputs.name }}-windows-x64.zip
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
- name: Upload Cli linux
|
- name: Upload Cli Linux
|
||||||
uses: actions/[email protected]
|
uses: actions/[email protected]
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
@@ -39,7 +43,7 @@ jobs:
|
|||||||
asset_path: ./gopeed-linux-x64.zip
|
asset_path: ./gopeed-linux-x64.zip
|
||||||
asset_name: gopeed-${{ steps.create_release.outputs.name }}-linux-x64.zip
|
asset_name: gopeed-${{ steps.create_release.outputs.name }}-linux-x64.zip
|
||||||
asset_content_type: application/zip
|
asset_content_type: application/zip
|
||||||
- name: Upload Cli darwin
|
- name: Upload Cli Darwin
|
||||||
uses: actions/[email protected]
|
uses: actions/[email protected]
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|||||||
@@ -1,7 +1,9 @@
|
|||||||
name: build
|
name: test
|
||||||
|
|
||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
|
branches:
|
||||||
|
- dev
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- dev
|
- dev
|
||||||
Reference in new issue
Block a user