Skip to content

Commit

Permalink
feat: homebrew/core formula, snap package (PR #76 from SpatiumPortae/…
Browse files Browse the repository at this point in the history
…develop)

feat: homebrew/core formula, snap package
  • Loading branch information
ZinoKader committed Mar 16, 2023
2 parents 37fd0c8 + 9e71f43 commit 7413488
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 15 deletions.
18 changes: 15 additions & 3 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,12 @@ on:
- "v[0-9]+.[0-9]+.[0-9]+"

jobs:
goreleaser:
release:
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}
BREW_TOKEN: ${{ secrets.BREW_TOKEN }}
SNAPCRAFT_STORE_CREDENTIALS: ${{ secrets.SNAPCRAFT_TOKEN }}
steps:
- name: Checkout branch
uses: actions/checkout@v3
Expand All @@ -20,10 +24,18 @@ jobs:
with:
go-version: 1.20.1

- name: Setup Snapcraft
uses: samuelmeuli/action-snapcraft@v2

- name: Release with goreleaser
uses: goreleaser/goreleaser-action@v3
with:
version: latest
args: release --rm-dist
env:
GITHUB_TOKEN: ${{ secrets.ACCESS_TOKEN }}

- name: Update Portal formula in homebrew/core
uses: dawidd6/action-homebrew-bump-formula@v3
with:
formula: portal
token: $BREW_TOKEN # Different token for creating a PR in homebrew/core.
force: false # Check for already open PRs.
34 changes: 32 additions & 2 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
project_name: portal

before:
hooks:
- go mod tidy

builds:
- id: "portal-client-app"
main: ./cmd/portal
Expand All @@ -19,6 +21,7 @@ builds:
- netbsd
- openbsd
ldflags: -s -w -X main.version={{.Tag}} -X main.revision={{.ShortCommit}} -X main.date={{.Date}}

archives:
- format: tar.gz
format_overrides:
Expand All @@ -35,13 +38,14 @@ archives:
files:
- LICENSE
- CREDITS

nfpms:
- formats:
- apk
- deb
- rpm
vendor: "portal"
description: "Portal is a quick and easy command-line file transfer utility from any computer to another 🖥️ 🌌 💻"
description: "Portal is a quick and easy command-line file transfer utility from any computer to another 🌌 ✨"
license: "MIT"
package_name: portal
replacements:
Expand All @@ -52,23 +56,49 @@ nfpms:
openbsd: OpenBSD
netbsd: NetBSD
freebsd: FreeBSD

brews:
- tap:
owner: SpatiumPortae
name: homebrew-portal
folder: Formula
homepage: "https://github.com/SpatiumPortae/portal"
description: "Portal is a quick and easy command-line file transfer utility from any computer to another 🖥️ 🌌 💻"
description: "Portal is a quick and easy command-line file transfer utility from any computer to another 🌌 ✨"
license: "MIT"

snapcrafts:
- publish: true
summary: Quick and easy command-line file transfer utility from any computer to another.
description: |
Portal is a quick and easy command-line file transfer utility from any computer to another 🌌 ✨.
Transfers are fully encrypted, and made peer-to-peer if possible, with a fallback to a relay
server if not.
grade: stable
confinement: strict
license: MIT
apps:
portal:
command: portal
plugs: ["network", "network-bind", "network-observe", "network-status"]

release:
prerelease: auto

checksum:
name_template: "checksums.txt"

snapshot:
name_template: "{{ incpatch .Version }}-next"

changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
- "^chore"
- "merge conflict"
- Merge pull request
- Merge remote-tracking branch
- Merge branch
- go mod tidy
25 changes: 15 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,24 +19,24 @@ a command-line file transfer utility for sending files from any computer to anot

## Installation

On any platform, you can get the [latest release manually](https://github.com/SpatiumPortae/portal/releases/latest), or simply run:

On macOS or Linux, if you are using Homebrew:
```bash
curl -sL https://portal.spatiumportae.com | bash
brew install portal
```
or

On Arch Linux (AUR):
```bash
wget -qO - https://portal.spatiumportae.com | bash
yay -S portal-bin
```

On macOS or Linux, if you are using Homebrew:
On any platform, you can get the [latest release manually](https://github.com/SpatiumPortae/portal/releases/latest), or simply run:

```bash
brew install SpatiumPortae/homebrew-portal/portal
curl -sL https://portal.spatiumportae.com | bash
```

On Arch Linux (AUR):
or
```bash
yay -S portal-bin
wget -qO - https://portal.spatiumportae.com | bash
```

## How it works
Expand Down Expand Up @@ -153,10 +153,15 @@ As evident by the file extension, the config is a simple [YAML](https://yaml.org

#### Default configuration
```yaml
# The URL of the relay server.
relay: portal.spatiumportae.com
# Log debug output to file.
verbose: false
# Prompt for overwriting duplicates when receiving files.
prompt_overwrite_files: true
# The port used when serving the relay using "portal serve".
relay_serve_port: 8080
# The style of the TUI.
tui_style: rich
```

Expand Down

0 comments on commit 7413488

Please sign in to comment.