Skip to content

Commit

Permalink
chore: add go releaser
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsd committed Oct 30, 2022
1 parent 9127f58 commit 42f52f7
Show file tree
Hide file tree
Showing 4 changed files with 71 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@
# config
config.yaml
devices.json

# go releaser
dist/
56 changes: 56 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com
before:
hooks:
# You may remove this if you don't use go modules.
- go mod tidy
# you may remove this if you don't need go generate
- go generate ./...
builds:
- id: "non-linux"
skip: false
env:
- CGO_ENABLED=1
goos:
- windows
- darwin
goarch:
- amd64
- arm64
- id: "linux"
skip: true
env:
- CGO_ENABLED=1
goos:
- linux
goarch:
- amd64
- arm64
archives:
- replacements:
darwin: Darwin
linux: Linux
windows: Windows
format: tar.gz
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'

# Check https://goreleaser.com/customization/homebrew/
brews:
- homepage: 'https://github.com/ntsd/cross-clipboard'
description: 'A multi device clipboard sharing over P2P network.'
folder: Formula
commit_author:
name: ntsd
email: jo06942@gmail.com
tap:
owner: ntsd
name: homebrew-cross-clipboard
3 changes: 3 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ run-terminal:
build:
go build .

release:
goreleaser release --rm-dist --snapshot

bind-android:
gomobile bind -target=android ./mobile/...

Expand Down
13 changes: 9 additions & 4 deletions Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ A multi device clipboard sharing over P2P network.
- Multicast DNS (Done) - discover a device in the same network
- E2E encryption (Done) - encrypt the clipboard data using OpenPGP
- Cross-platform desktop (Done) - support Windows, Linux, and Darwin (macOS)
- Terminal GUI (Ongoing) - terminal user interface for the end user
- Terminal GUI (Done) - terminal user interface for the end user
- Cross-platform mobile (Plan) - support iOS and Android

## Libraries
Expand All @@ -32,6 +32,13 @@ for Go user you can just install using go package
go install github.com/ntsd/cross-clipboard@latest
```

### Homebrew tap install

```shell
brew tap ntsd/cross-clipboard
brew install cross-clipboard
```

### Headless Linux

for headless linux you might need to install `xvfb`.
Expand Down Expand Up @@ -88,8 +95,6 @@ Generate a protobuf go file using protoc

## TODO

- Release binary file (Ongoing)
- Publish to Homebrew and Deb package (Ongoing)
- Publish to Deb package (Ongoing)
- Fix bug on this PNG image <https://mdg.imgix.net/assets/images/tux.png?auto=format&fit=clip&q=40&w=100> (Ongoing)
- Auto start (Plan)
- Unit testing (Plan)

0 comments on commit 42f52f7

Please sign in to comment.