mirror of
https://github.com/pushbits/cli.git
synced 2025-07-23 03:33:01 +02:00
Provide binaries with GoReleaser
This commit is contained in:
24
.github/workflows/main.yml
vendored
24
.github/workflows/main.yml
vendored
@@ -1,16 +1,32 @@
|
||||
name: Main
|
||||
on: push
|
||||
permissions:
|
||||
contents: write
|
||||
jobs:
|
||||
test_publish:
|
||||
name: Test and build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v2
|
||||
with:
|
||||
fetch-depth: 0
|
||||
- name: Install dependencies
|
||||
run: make setup
|
||||
- name: Export GOBIN
|
||||
uses: actions/setup-go@v2
|
||||
with:
|
||||
go-version: 1.16
|
||||
- name: Run tests
|
||||
run: |
|
||||
export PATH="$PATH:$(go env GOPATH)/bin" # Currently the path needs to be set manually.
|
||||
make test
|
||||
run: make test
|
||||
- name: Build
|
||||
run: make build
|
||||
- name: Run GoReleaser
|
||||
uses: goreleaser/goreleaser-action@v2
|
||||
if: startsWith(github.ref, 'refs/tags/') # Only release for tagged commits.
|
||||
with:
|
||||
distribution: goreleaser
|
||||
version: latest
|
||||
args: release --rm-dist
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,3 +1,4 @@
|
||||
dist/
|
||||
out/
|
||||
|
||||
### Go
|
||||
|
31
.goreleaser.yml
Normal file
31
.goreleaser.yml
Normal file
@@ -0,0 +1,31 @@
|
||||
builds:
|
||||
- id: pbcli
|
||||
main: ./cmd/pbcli
|
||||
goos:
|
||||
- linux
|
||||
- windows
|
||||
- freebsd
|
||||
- openbsd
|
||||
- darwin
|
||||
goarch:
|
||||
- amd64
|
||||
- 386
|
||||
- arm
|
||||
- arm64
|
||||
ignore:
|
||||
- goos: freebsd
|
||||
goarch: arm64
|
||||
|
||||
checksum:
|
||||
algorithm: sha256
|
||||
|
||||
archives:
|
||||
- id: pbcli
|
||||
builds:
|
||||
- pbcli
|
||||
format: tar.gz
|
||||
replacements:
|
||||
darwin: macOS
|
||||
format_overrides:
|
||||
- goos: windows
|
||||
format: zip
|
@@ -17,14 +17,12 @@ Further, it can be used by administrators to add and remove users.
|
||||
|
||||
## Installation
|
||||
|
||||
The following command will download, build, and install the tool.
|
||||
|
||||
It it easiest to download the binary from the [latest release](https://github.com/pushbits/cli/releases).
|
||||
Alternatively, build it yourself:
|
||||
```bash
|
||||
go get -u github.com/pushbits/cli/cmd/pbcli
|
||||
go get -u github.com/pushbits/cli/cmd/...
|
||||
```
|
||||
|
||||
Note that this requires [a working Go 1.12+ installation](https://golang.org/doc/install).
|
||||
|
||||
## Usage
|
||||
|
||||
If you are a normal user of PushBits, you will most likely just want to manage your applications.
|
||||
|
Reference in New Issue
Block a user