Skip to content

chore(ci): only release after CI on main passes #110

chore(ci): only release after CI on main passes

chore(ci): only release after CI on main passes #110

Workflow file for this run

on:
push:
branches:
- main
pull_request:
name: CI
jobs:
test:
name: Test
runs-on: ubuntu-latest
env:
GOPROXY: direct
steps:
- uses: actions/checkout@v4
- uses: cashapp/activate-hermit@v1
- run: |
find . -name go.mod | grep -v /testdata | xargs -n1 dirname | while read dir; do (
cd "$dir"
go mod tidy
go test -v ./...
); done
git diff
lint:
name: Lint
runs-on: ubuntu-latest
env:
GOPROXY: direct
steps:
- uses: actions/checkout@v4
- uses: cashapp/activate-hermit@v1
- run: |
find . -name go.mod | grep -v /testdata | xargs -n1 dirname | while read dir; do (
cd "$dir"
go mod tidy
golangci-lint run
); done
git diff
release:
name: Release
# Only try release on main branch
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
needs: ["test", "lint"]
steps:
- uses: ./.github/workflows/release