Skip to content

Commit

Permalink
switch to single job
Browse files Browse the repository at this point in the history
  • Loading branch information
jpillora committed Aug 15, 2022
1 parent f8b7ca6 commit 865d41b
Showing 1 changed file with 3 additions and 26 deletions.
29 changes: 3 additions & 26 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,8 @@ on:
workflow_dispatch:
inputs: {}
jobs:
# ================
# TEST JOB
# ================
test:
name: Test
ci:
name: CI
runs-on: ubuntu-latest
steps:
- name: Checkout
Expand All @@ -30,28 +27,8 @@ jobs:
run: go build -v .
- name: Test
run: go test -v ./...
# ================
# RELEASE JOB
# runs after a success test
# only runs on push "v*" tag
# ================
release:
name: Release
needs: test
if: startsWith(github.ref, 'refs/tags/v')
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: '1.18'
check-latest: true
cache: true
- name: Run GoReleaser
if: startsWith(github.ref, 'refs/tags/v')
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser
Expand Down

0 comments on commit 865d41b

Please sign in to comment.