diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7f82f8c43a..189c3915df 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -3,48 +3,17 @@ on: [push, pull_request] jobs: build: - strategy: - matrix: - go-version: [~1.18, ^1] - os: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{ matrix.os }} - env: - GO111MODULE: "on" - steps: - - name: Install Go - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.go-version }} - - - name: Checkout code - uses: actions/checkout@v4 - - - name: Download Go modules - run: go mod download - - - name: Build - run: | - go mod tidy - go build -v ./... - - - name: Test - run: go test ./... - - - name: Build examples - if: ${{ matrix.go-version != '~1.18' }} - run: | - go mod tidy - go build -v ./... - working-directory: ./examples - - - name: Test examples - if: ${{ matrix.go-version != '~1.18' }} - run: go test -v ./... - working-directory: ./examples - - - name: Build tutorials - if: ${{ matrix.go-version != '~1.18' }} - run: | - go mod tidy - go build -v ./... - working-directory: ./tutorials + uses: charmbracelet/meta/.github/workflows/build.yml@main + + build-go-mod: + uses: charmbracelet/meta/.github/workflows/build.yml@main + with: + go-version: "" + go-version-file: ./go.mod + + build-examples: + uses: charmbracelet/meta/.github/workflows/build.yml@main + with: + go-version: "" + go-version-file: ./examples/go.mod + working-directory: ./examples