diff --git a/,github/workflows/ci.yml b/,github/workflows/ci.yml new file mode 100644 index 0000000..4d6737d --- /dev/null +++ b/,github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: Go Build & Test +on: + push: + branches: + - 'master' + pull_request: + branches: + - '*' +jobs: + build: + strategy: + matrix: + os: [ubuntu-latest, macOS-latest, windows-latest] + runs-on: ${{ matrix.os }} + name: Build & Test + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-go@v2 + with: + go-version: '^1.14.0' + - run: go mod download + - name: Build & Test + run: | + ./update-version.sh + go build -v . + go test ./... + - name: Run GoReleaser + uses: goreleaser/goreleaser-action@master + with: + args: release --snapshot --skip-publish --rm-dist \ No newline at end of file diff --git a/,github/workflows/release.yml b/,github/workflows/release.yml new file mode 100644 index 0000000..ff91fe9 --- /dev/null +++ b/,github/workflows/release.yml @@ -0,0 +1,22 @@ +name: Release with goreleaser +on: + push: + tags: + - v*.*.* +jobs: + build: + runs-on: ubuntu-latest + name: goreleaser + steps: + - uses: actions/checkout@v2 + - name: Unshallow Fetch + run: git fetch --prune --unshallow + - uses: actions/setup-go@v2 + with: + go-version: '^1.14.0' + - name: Release via goreleaser + uses: goreleaser/goreleaser-action@master + with: + args: release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index a5b6dd0..fda534b 100644 --- a/.gitignore +++ b/.gitignore @@ -5,7 +5,6 @@ *.so *.dylib ./FLEcli -#executables/* test/output/temp/* # Test binary, built with `go test -c` diff --git a/.goreleaser.yml b/.goreleaser.yml new file mode 100644 index 0000000..73f2eb3 --- /dev/null +++ b/.goreleaser.yml @@ -0,0 +1,40 @@ +# This is an example goreleaser.yaml file with some sane defaults. +# Make sure to check the documentation at http://goreleaser.com +before: + hooks: + # Update the version so that it is included in the app + - ./update-version.sh +builds: +- goos: + - linux + - windows + - darwin + ignore: + - goos: darwin + goarch: 386 + - goos: windows + goarch: amd64 + env: + - CGO_ENABLED=0 +archives: +- replacements: + amd64: 64-bit + 386: 32-bit + darwin: macOS + linux: Linux + name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}" + format_overrides: + - goos: windows + format: zip + files: + - README.md +checksum: + name_template: 'checksums.txt' +snapshot: + name_template: "{{ .Tag }}-next" +changelog: + sort: asc + filters: + exclude: + - '^docs:' + - '^test:' diff --git a/FLEcli b/FLEcli deleted file mode 100755 index 811bb67..0000000 Binary files a/FLEcli and /dev/null differ diff --git a/cmd/FLEcli_version.go b/cmd/FLEcli_version.go index 5bf2b28..009baab 100644 --- a/cmd/FLEcli_version.go +++ b/cmd/FLEcli_version.go @@ -1,4 +1,4 @@ package cmd //VersionString is the version that will be displayed with the -v switch -const VersionString = "v0.0.0 (2020-07-16)" +const VersionString = "v0.0.0-1-gb4c7401 (2020-07-18)" diff --git a/executables/linux/FLEcli-amd64 b/executables/linux/FLEcli-amd64 deleted file mode 100755 index 39adc44..0000000 Binary files a/executables/linux/FLEcli-amd64 and /dev/null differ diff --git a/executables/macos/FLEcli b/executables/macos/FLEcli deleted file mode 100755 index 313a4d3..0000000 Binary files a/executables/macos/FLEcli and /dev/null differ diff --git a/executables/windows/FLEcli.exe b/executables/windows/FLEcli.exe deleted file mode 100755 index ec8944c..0000000 Binary files a/executables/windows/FLEcli.exe and /dev/null differ diff --git a/full_build.sh b/full_build.sh deleted file mode 100755 index 1de613f..0000000 --- a/full_build.sh +++ /dev/null @@ -1,18 +0,0 @@ -#!/bin/bash - -set -e - -echo "Testing..." - -go test ./... - -mkdir -p executables/windows -mkdir -p executables/macos -mkdir -p executables/linux - -./update-version.sh - -GOOS=windows GOARCH=386 go build -o executables/windows/FLEcli.exe -GOOS=darwin GOARCH=amd64 go build -o executables/macos/FLEcli -GOOS=linux GOARCH=amd64 go build -o executables/linux/FLEcli-amd64 -