From 0ed60efb461cd4810c4c7d64c3d2ae43dadea5ff Mon Sep 17 00:00:00 2001 From: C123R Date: Sat, 11 Apr 2020 17:22:57 +0200 Subject: [PATCH] feat: replacing github action with travis --- .github/workflows/ci.yml | 23 +++++++++++++++++++++++ .github/workflows/release.yml | 22 ++++++++++++++++++++++ .travis.yml | 30 ------------------------------ 3 files changed, 45 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/ci.yml create mode 100644 .github/workflows/release.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..526b194 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,23 @@ +name: ci +on: + push: + branches: + - master + pull_request: + branches: + - master +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + - name: Setup Go + uses: actions/setup-go@v1 + with: + go-version: 1.13 + - name: GoReleaser + uses: goreleaser/goreleaser-action@v1 + with: + version: latest + args: release --snapshot --rm-dist diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..8f095dc --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,22 @@ +name: release +on: + push: + tags: + - 'v*.*.*' +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + - name: Setup Go + uses: actions/setup-go@v1 + with: + go-version: 1.13 + - name: GoReleaser + uses: goreleaser/goreleaser-action@v1 + with: + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9265f7d..0000000 --- a/.travis.yml +++ /dev/null @@ -1,30 +0,0 @@ -language: go -go: - - "1.13" - -env: - - GO111MODULE=on - -before_install: - - sudo apt-get update - - sudo apt-get install -y libpcap-dev gcc - -install: - - go mod download - -after_success: - # Set up git user name and tag this commit - - git config --global user.email "travis@travis-ci.org" - - git config --global user.name "Travis CI" - - export TRAVIS_TAG=${TRAVIS_TAG:-$(cat VERSION)} - - git tag -a $TRAVIS_TAG $(git log --format=%h -1) -m "Generated tag from Travis CI based on VERSION file" - - test -n "$TRAVIS_TAG" && curl -s https://raw.githubusercontent.com/goreleaser/get/master/latest | bash - -deploy: - - provider: script - github_token: $GITHUB_TOKEN - skip_cleanup: true - script: curl -sL https://git.io/goreleaser | bash - -notifications: - email: false