Disturbute binary file(cli app)
For homebrew and apt you need to create a github release(or push you binary file as a tar file in any other fileserver)
- create a github repositry named homebrew-appName
- build your app and make a binary named [appName]
- tar it using
tar -czf osTarget-appName-version.tar.gz appName
- create a ssh for this file using
shasum -a 256 osTarget-appName-version.tar.gz
- create a github release with yor tar file as an asset
- put a rb file like this in your repository using link of your tar file and created ssh
- rb file is a homebrew formula
- now you can install your app with
brew install [github-userName]/[appName]/[name-of-rb-file]
- If you want to install with
brew install appName
you need to use homebrew-core (if your app is open-source) or cask. For more information visit here
- build your app and make a binary named [appName]
- make a directory named linux
- make a directory named DEBIAN and put control file in it
- make a directory named usr/local/bin and put your binary in it
- run this command in root of your project
dpkg-deb -b <path/to/source/linux> <destination/dir>
- now you can install created deb file in destination dir with
apt install <deb-file.deb>
First you need goreleaser and npm installed on your system
- run
goreleaser init
in root of your project - change .goreleaser.yml based on your project, forexample add project_name to yaml file(it's default value is folder name)
- run
goreleaser release
- If your app is open-source continue in this directory and if it is not make a new directory and move dist folder to it
- run
npm init
- download postinstall.js and add it to your dir
- change example in postinstall.js line 144 with the name of your package in step 2
- Add scripts, goBinary, files, dependencies to your package.json like this
- run
npm publish
- now you can install your binary with
npm i package-name
This solotion is a changed version for this solotion