diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..c426533 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,30 @@ +name: Release + +on: + push: + tags: + - 'v*' + +jobs: + build: + runs-on: ubuntu-latest + name: Build + steps: + - name: Checkout code + uses: actions/checkout@v2 + - name: Setup Go + uses: actions/setup-go@v1 + with: + go-version: '1.13.8' + - name: Install gox + run: go get github.com/mitchellh/gox + - name: Build binaries in parallel + run: $HOME/go/bin/gox -osarch="linux/amd64 darwin/amd64 windows/386 windows/amd64" -output "build/vault-plugin-database-aerospike_${GITHUB_REF##*/}_{{.OS}}_{{.Arch}}/vault-plugin-database-aerospike" ./plugin + - name: Package binaries + run: cd build; for dir in *; do zip -r $dir.zip $dir; done + - name: Release + uses: softprops/action-gh-release@v1 + with: + files: build/*.zip + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..567609b --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +build/ diff --git a/README.md b/README.md index 3bb6569..7ec023f 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,10 @@ This project uses the database plugin interface introduced in Vault version 0.7. ## Build +Pre-built binaries for Linux, macOS and Windows can be found at [the releases page](https://github.com/G-Research/vault-plugin-database-aerospike/releases). + +For other platforms, there are not currently pre-built binaries available. + To build, `git clone` this repository and `go build -o vault-plugin-database-aerospike ./plugin` from the project directory. ## Installation