diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..0db449c --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,29 @@ +name: goreleaser + +on: + push: + tags: + - v* + +jobs: + goreleaser: + runs-on: ubuntu-latest + steps: + - + name: Checkout + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - + name: Set up Go + uses: actions/setup-go@v2 + - + name: Run GoReleaser + uses: goreleaser/goreleaser-action@v2 + with: + # either 'goreleaser' (default) or 'goreleaser-pro' + distribution: goreleaser + version: latest + args: release --rm-dist + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..ddd1c89 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,25 @@ +name: Test + +on: + push: + branches: [ master ] + pull_request: + branches: [ master ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v3 + with: + go-version: 1.18 + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index bc35b66..0000000 --- a/.travis.yml +++ /dev/null @@ -1,31 +0,0 @@ -language: go -sudo: false -go: - - 1.15.6 - - tip - -env: - GO111MODULE=on - -script: - - go mod download - - go test -v -race -covermode=atomic -coverprofile=coverage.out - -after_success: - - bash <(curl -s https://codecov.io/bash) - -before_deploy: - - curl -sL https://git.io/goreleaser | bash -deploy: - provider: releases - api_key: $GITHUB_TOKEN - file_glob: true - file: - - dist/clickhouse-bulk-*.zip - - dist/clickhouse-bulk-*.tar.bz2 - - dist/clickhouse-bulk-*.sha256 - skip_cleanup: true - on: - tags: true - repo: nikepan/clickhouse-bulk - condition: $TRAVIS_GO_VERSION =~ ^1\.15\.[0-9]+$