From 901069ab1adc27b4cbaa3a856c1285b1a2f67b9f Mon Sep 17 00:00:00 2001 From: Kirill Date: Fri, 7 Feb 2020 16:51:26 +0300 Subject: [PATCH] #42 - actions release --- .travis.yml => .github/workflows/release.yml | 39 ++++++++++++-------- .goreleaser.yml | 7 ++-- 2 files changed, 27 insertions(+), 19 deletions(-) rename .travis.yml => .github/workflows/release.yml (66%) diff --git a/.travis.yml b/.github/workflows/release.yml similarity index 66% rename from .travis.yml rename to .github/workflows/release.yml index 4f85ff7..e86d064 100644 --- a/.travis.yml +++ b/.github/workflows/release.yml @@ -21,18 +21,27 @@ # ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR # OTHER DEALINGS IN THE SOFTWARE. --- -language: go -go: - - 1.12.x -env: - GO111MODULE: "on" -script: - - go build - - go build ./cmd/gitstrap - - go test -deploy: - - provider: script - skip_cleanup: true - script: curl -sL https://git.io/goreleaser | bash - "on": - tags: true +name: gorelease +"on": + push: + tags: + - '*' +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + - name: Unshallow + run: git fetch --prune --unshallow + - name: Set up Go + uses: actions/setup-go@v1 + with: + go-version: 1.13.x + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v1 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.API_GITHUB_TOKEN }} diff --git a/.goreleaser.yml b/.goreleaser.yml index 1fbcf44..59b0953 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -1,8 +1,7 @@ +--- builds: - main: ./cmd/gitstrap/main.go - env: - - CGO_ENABLED=0 ldflags: - -s -w -X "main.buildDate={{.Date}}" @@ -34,5 +33,5 @@ changelog: sort: asc filters: exclude: - - '^docs:' - - '^test:' + - '^docs:' + - '^test:'