From c035902d4784078bba24fc772cfc0da435c5bd2e Mon Sep 17 00:00:00 2001 From: axetroy Date: Tue, 12 May 2020 16:40:36 +0800 Subject: [PATCH] update ci --- .github/workflows/{ci.yml => build.yml} | 54 ++++++++++++------------- README.md | 2 +- 2 files changed, 27 insertions(+), 29 deletions(-) rename .github/workflows/{ci.yml => build.yml} (60%) diff --git a/.github/workflows/ci.yml b/.github/workflows/build.yml similarity index 60% rename from .github/workflows/ci.yml rename to .github/workflows/build.yml index f99e757a3..4b8a61fe6 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/build.yml @@ -1,4 +1,4 @@ -name: ci +name: build on: [push, pull_request] @@ -34,15 +34,13 @@ jobs: --health-timeout 5s --health-retries 5 # env: - # "redis-cli ping" + # "redis-cli ping" ports: # Maps port 6379 on service container to the host - 6379:6379 steps: - - uses: actions/checkout@master - with: - fetch-depth: 1 + - uses: actions/checkout@v2 - uses: actions/setup-go@v1 with: @@ -73,27 +71,27 @@ jobs: run: | GO111MODULE=off go get golang.org/x/tools/cmd/cover GO111MODULE=off go get github.com/mattn/goveralls - $(go env GOPATH)/bin/goveralls -coverprofile=coverage.out -service=github - # after success - # - name: Coverage - # if: startsWith(matrix.os, 'ubuntu') - # run: | - # go get golang.org/x/tools/cmd/cover - # go get github.com/mattn/goveralls - # /home/runner/go/bin/goveralls -coverprofile=coverage.out -service=github-action -repotoken ${{ secrets.COVERALLS_TOKEN }} + $(go env GOPATH)/bin/goveralls -coverprofile=coverage.out -service="GitHub Action" -jobid="${{ github.run_id }}" -jobnumber="${{ github.run_number }}" -reponame="${{ github.repository }}" -# release: -# name: Release to Github -# if: startsWith(github.ref, 'refs/tags/') && github.repository == 'axetroy/go-server' -# needs: build -# runs-on: ubuntu-latest -# steps: -# - uses: softprops/action-gh-release@v1 -# env: -# GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} -# with: -# files: | -# bin/wsm_darwin_amd64.tar.gz -# bin/wsm_linux_amd64.tar.gz -# bin/wsm_windows_amd64.tar.gz -# draft: false + - uses: softprops/action-gh-release@v1 + name: Release to Github + if: startsWith(github.ref, 'refs/tags/') && github.repository == 'axetroy/go-server' + env: + # require Github Personal Access Token + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} + with: + files: | + ./bin/vscode-deno.vsix + ./bin/user_server_darwin_amd64.tar.gz + ./bin/user_server_linux_amd64.tar.gz + ./bin/user_server_windows_amd64.tar.gz + ./bin/admin_server_darwin_amd64.tar.gz + ./bin/admin_server_linux_amd64.tar.gz + ./bin/admin_server_windows_amd64.tar.gz + ./bin/resource_server_darwin_amd64.tar.gz + ./bin/resource_server_linux_amd64.tar.gz + ./bin/resource_server_windows_amd64.tar.gz + ./bin/message_queue_server_darwin_amd64.tar.gz + ./bin/message_queue_server_linux_amd64.tar.gz + ./bin/message_queue_server_windows_amd64.tar.gz + draft: false diff --git a/README.md b/README.md index fce010b4f..fdc1bb5b4 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -![ci](https://github.com/axetroy/go-server/workflows/ci/badge.svg) +![build](https://github.com/axetroy/go-server/workflows/build/badge.svg) [![Coverage Status](https://coveralls.io/repos/github/axetroy/go-server/badge.svg?branch=master)](https://coveralls.io/github/axetroy/go-server?branch=master) [![Go Report Card](https://goreportcard.com/badge/github.com/axetroy/go-server)](https://goreportcard.com/report/github.com/axetroy/go-server) ![License](https://img.shields.io/github/license/axetroy/go-server.svg)