Skip to content

Commit

Permalink
fix ci
Browse files Browse the repository at this point in the history
  • Loading branch information
jpillora committed Aug 10, 2022
1 parent fabaa21 commit f8e200b
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 54 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: CI
jobs:
# ================
# TEST JOB
# ================
test:
name: Test
runs-on: ubuntu-latest
runs-on: ${{ matrix.platform }}
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: Checkout code
uses: actions/checkout@v2
- name: Build
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
uses: goreleaser/goreleaser-action@v3
with:
distribution: goreleaser
version: latest
args: release --rm-dist --config .github/goreleaser.yml
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
30 changes: 0 additions & 30 deletions .github/workflows/release.yml

This file was deleted.

24 changes: 0 additions & 24 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit f8e200b

Please sign in to comment.