diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index ab9a728b..2a93abc7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -3,12 +3,16 @@ name: release on: push: branches: - - dev + - master jobs: release: runs-on: ubuntu-latest steps: + - uses: actions/setup-go@v2 + with: + go-version: '^1.15.2' + - uses: actions/checkout@v2 - name: Build Cli run: | 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 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - name: Upload Cli windows + - name: Upload Cli Windows uses: actions/upload-release-asset@v1.0.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -30,7 +34,7 @@ jobs: asset_path: ./gopeed-windows-x64.zip asset_name: gopeed-${{ steps.create_release.outputs.name }}-windows-x64.zip asset_content_type: application/zip - - name: Upload Cli linux + - name: Upload Cli Linux uses: actions/upload-release-asset@v1.0.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} @@ -39,7 +43,7 @@ jobs: asset_path: ./gopeed-linux-x64.zip asset_name: gopeed-${{ steps.create_release.outputs.name }}-linux-x64.zip asset_content_type: application/zip - - name: Upload Cli darwin + - name: Upload Cli Darwin uses: actions/upload-release-asset@v1.0.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/build.yml b/.github/workflows/test.yml similarity index 96% rename from .github/workflows/build.yml rename to .github/workflows/test.yml index 615a13f2..34eeae77 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/test.yml @@ -1,7 +1,9 @@ -name: build +name: test on: pull_request: + branches: + - dev push: branches: - dev