Add ci/cd GH actions

Signed-off-by: Pierre-Emmanuel Jacquier <15922119+pierre-emmanuelJ@users.noreply.github.com>
This commit is contained in:
Pierre-Emmanuel Jacquier
2020-05-19 21:58:46 +02:00
parent 20f07dc0a1
commit 3a9130f54b
3 changed files with 51 additions and 19 deletions

50
.github/workflows/main.yml vendored Normal file
View File

@@ -0,0 +1,50 @@
name: CI
on:
pull_request:
push:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Run golangci-lint
uses: actions-contrib/golangci-lint@v1
- name: Run tests and attempt building
run: |
export PATH=$(go env GOPATH)/bin:$PATH
go test -mod vendor -v -race ./...
go build -mod vendor
---
name: goreleaser
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@v2
with:
go-version: 1.14
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v2
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

View File

@@ -1,18 +0,0 @@
language: go
go:
- "1.12.x"
- "1.13.x"
os:
- linux
- darwin
- windows
go_import_path: github.com/pierre-emmanuelJ/iptv-proxy
env:
- GO111MODULE=on
script:
- go build -mod=vendor

View File

@@ -1,6 +1,6 @@
# Iptv Proxy
[![Build Status](https://travis-ci.com/pierre-emmanuelJ/iptv-proxy.svg?branch=master)](https://travis-ci.com/pierre-emmanuelJ/iptv-proxy)
[![Actions Status](https://github.com/exoscale/iptv-proxy/workflows/CI/badge.svg)](https://github.com/exoscale/iptv-proxy/actions?query=workflow%3ACI)
## Description