From 879536d324cd15582ac3dac188663381c1456548 Mon Sep 17 00:00:00 2001 From: Simon Prochazka Date: Sun, 15 Dec 2019 17:57:56 +0100 Subject: [PATCH] chore(ci): switch to Github Actions - to lower the amount of needed set up when using this template I have decided to move all the logic to Github Actions --- .drone.yml | 56 ----------------------------------- .github/workflows/linters.yml | 12 ++++++++ .github/workflows/release.yml | 17 +++++++++++ .github/workflows/test.yml | 21 +++++++++++++ go.mod | 2 +- 5 files changed, 51 insertions(+), 57 deletions(-) delete mode 100644 .drone.yml create mode 100644 .github/workflows/linters.yml create mode 100644 .github/workflows/release.yml create mode 100644 .github/workflows/test.yml diff --git a/.drone.yml b/.drone.yml deleted file mode 100644 index 7d687b5..0000000 --- a/.drone.yml +++ /dev/null @@ -1,56 +0,0 @@ -kind: pipeline -name: default - -steps: - - name: fetch - image: docker:git - commands: - - git fetch origin master - - git fetch --tags - when: - event: [tag] - - - name: test - image: golang - volumes: - - name: deps - path: /go - commands: - - make ci - depends_on: [clone] - when: - event: [pull_request] - - - name: validate commits - image: outillage/commitsar:0.9.0 - depends_on: [clone] - when: - event: [pull_request] - - - name: release notes - image: outillage/release-notary:0.5.3 - environment: - GITHUB_TOKEN: - from_secret: github_token - GITHUB_REPOSITORY: ${CI_REPO} - when: - event: tag - depends_on: [fetch] - - - name: release - image: golang - environment: - GITHUB_TOKEN: - from_secret: github_token - volumes: - - name: deps - path: /go - commands: - - curl -sL https://git.io/goreleaser | bash - when: - event: tag - depends_on: [fetch] - -volumes: - - name: deps - temp: {} diff --git a/.github/workflows/linters.yml b/.github/workflows/linters.yml new file mode 100644 index 0000000..ee8656e --- /dev/null +++ b/.github/workflows/linters.yml @@ -0,0 +1,12 @@ +name: Linters + +on: [pull_request] + +jobs: + validate-commits: + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + - name: Commitsar check + uses: docker://outillage/commitsar diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7136e2b --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,17 @@ +name: Release + +on: + push: + tags: + - "v*" + +jobs: + release: + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + - name: Release Notary + uses: docker://outillage/release-notary + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..c298aef --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,21 @@ +name: Test + +on: [pull_request] + +jobs: + go: + runs-on: ubuntu-latest + + strategy: + matrix: + go-version: [1.12.x, 1.13.x] + + steps: + - name: Install Go + uses: actions/setup-go@v1 + with: + go-version: ${{ matrix.go-version }} + - name: Check out code into the Go module directory + uses: actions/checkout@v1 + - name: Test + run: make ci diff --git a/go.mod b/go.mod index 4f92d0e..798ec39 100644 --- a/go.mod +++ b/go.mod @@ -1,3 +1,3 @@ module github.com/fallion/go-template -go 1.12 +go 1.13