diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 067ee56..c9fcf3f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,28 +1,12 @@ name: build -on: [push, pull_request] -jobs: - test: - strategy: - matrix: - go-version: [~1.17] - os: [ubuntu-latest, macos-latest, windows-latest] - runs-on: ${{ matrix.os }} - env: - GO111MODULE: "on" - steps: - - name: Install Go - uses: actions/setup-go@v2 - with: - go-version: ${{ matrix.go-version }} - - - name: Checkout code - uses: actions/checkout@v2 - - name: Download Go modules - run: go mod download +on: [push, pull_request] - - name: Build - run: go build -v ./... +jobs: + build: + uses: charmbracelet/meta/.github/workflows/build.yml@main - - name: Test - run: go test ./... + snapshot: + uses: charmbracelet/meta/.github/workflows/snapshot.yml@main + secrets: + goreleaser_key: ${{ secrets.GORELEASER_KEY }} \ No newline at end of file diff --git a/.github/workflows/goreleaser.yml b/.github/workflows/goreleaser.yml new file mode 100644 index 0000000..55b3662 --- /dev/null +++ b/.github/workflows/goreleaser.yml @@ -0,0 +1,19 @@ +name: goreleaser + +on: + push: + tags: + - v*.*.* + +concurrency: + group: goreleaser + cancel-in-progress: true + +jobs: + goreleaser: + uses: charmbracelet/meta/.github/workflows/goreleaser.yml@main + secrets: + docker_username: ${{ secrets.DOCKERHUB_USERNAME }} + docker_token: ${{ secrets.DOCKERHUB_TOKEN }} + gh_pat: ${{ secrets.PERSONAL_ACCESS_TOKEN }} + goreleaser_key: ${{ secrets.GORELEASER_KEY }} diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 8f5e197..6249b5b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -1,5 +1,7 @@ name: lint -on: [push, pull_request] +on: + push: + pull_request: jobs: golangci: @@ -12,7 +14,5 @@ jobs: with: # Optional: golangci-lint command line arguments. args: --issues-exit-code=0 - # Optional: working directory, useful for monorepos - # working-directory: somedir # Optional: show only new issues if it's a pull request. The default value is `false`. only-new-issues: true diff --git a/.github/workflows/soft-serve.yml b/.github/workflows/soft-serve.yml new file mode 100644 index 0000000..b10a5c9 --- /dev/null +++ b/.github/workflows/soft-serve.yml @@ -0,0 +1,12 @@ +name: soft-serve + +on: + push: + branches: + - main + +jobs: + soft-serve: + uses: charmbracelet/meta/.github/workflows/soft-serve.yml@main + secrets: + ssh-key: "${{ secrets.CHARM_SOFT_SERVE_KEY }}" \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..eea5c74 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,3 @@ +includes: + - from_url: + url: charmbracelet/meta/main/goreleaser-lib.yaml \ No newline at end of file