Skip to content

Commit

Permalink
Split workflows
Browse files Browse the repository at this point in the history
Tests and release workflows have been split out from CI.
  • Loading branch information
arbourd committed May 25, 2020
1 parent c7140df commit 34714d3
Show file tree
Hide file tree
Showing 2 changed files with 42 additions and 24 deletions.
40 changes: 16 additions & 24 deletions .github/workflows/ci.yml → .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,12 @@
name: ci
name: release

on:
pull_request:
push:
branches:
- master
tags:
- '*'
- v*

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.14
- run: go mod download
- run: go test

release:
if: startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest

steps:
Expand All @@ -45,3 +23,17 @@ jobs:
args: release --rm-dist --skip-publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

bump:
if: startsWith(github.ref, 'refs/tags/v')
name: Bump Homebrew formula
runs-on: ubuntu-latest

steps:
- uses: mislav/bump-homebrew-formula-action@v1
if: "!contains(github.ref, '-')" # skip prereleases
with:
formula-name: git-get
homebrew-tap: arbourd/homebrew-tap
env:
COMMITTER_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
26 changes: 26 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: test

on:
pull_request:
push:
branches:
- master

jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
- macOS-latest
- windows-latest

steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: 1.14
- run: go mod download
- run: go test

0 comments on commit 34714d3

Please sign in to comment.