diff --git a/.github/workflows/go-build.yml b/.github/workflows/go-build.yml new file mode 100644 index 0000000..8edcf37 --- /dev/null +++ b/.github/workflows/go-build.yml @@ -0,0 +1,34 @@ +name: Go + +on: [push, pull_request] + +jobs: + + build: + name: Build + runs-on: ubuntu-latest + steps: + + - name: Set up Go 1.14 + uses: actions/setup-go@v1 + with: + go-version: 1.14.x + id: go + + - name: Check out code into the Go module directory + uses: actions/checkout@v2 + + - name: Unshallow + run: git fetch --prune --unshallow + + - name: Build & test + run: make + + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@v1 + with: + version: latest + args: release --rm-dist + key: ${{ secrets.YOUR_PRIVATE_KEY }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index eb56052..da63680 100644 --- a/.gitignore +++ b/.gitignore @@ -14,4 +14,5 @@ main # directories # ############### -.idea/ \ No newline at end of file +.idea/ +dist/ \ No newline at end of file diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..a40c8df --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,35 @@ +# This is an example goreleaser.yaml file with some sane defaults. +# Make sure to check the documentation at http://goreleaser.com +before: + hooks: + # You may remove this if you don't use go modules. + - make plugins +builds: + - id: "default" + ldflags: + - -w -s + goos: + - linux + goarch: + - amd64 +archives: + - id: default + builds: + - default + name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + replacements: + amd64: x86_64 + wrap_in_directory: true + files: + - config.yaml + - plugins/*.so +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:'