Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: release
on:
push:
tags:
- "*"

permissions:
contents: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: setup go
uses: actions/setup-go@v5
with:
go-version: stable
- name: run goreleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: ${{ env.GITHUB_REF_NAME }}
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.PUBLISHER_TOKEN }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
tmp/

dist/
90 changes: 90 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
# This is an example .goreleaser.yml file with some sensible defaults.
# Make sure to check the documentation at https://goreleaser.com

# The lines below are called `modelines`. See `:help modeline`
# Feel free to remove those if you don't want/need to use them.
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

version: 2

builds:
- id: pockets
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
binary: pockets
dir: ./server
- id: pocketsctl
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
binary: pocketsctl
dir: ./cli

archives:
- id: pockets
builds:
- pockets
format: tar.gz
name_template: >-
pockets_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
format_overrides:
- goos: windows
format: zip
- id: pocketsctl
builds:
- pocketsctl
format: tar.gz
name_template: >-
pocketsctl_
{{- title .Os }}_
{{- if eq .Arch "amd64" }}x86_64
{{- else if eq .Arch "386" }}i386
{{- else }}{{ .Arch }}{{ end }}
{{- if .Arm }}v{{ .Arm }}{{ end }}
format_overrides:
- goos: windows
format: zip

changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"

release:
footer: >-

---

Released by [GoReleaser](https://github.com/goreleaser/goreleaser).
brews:
- name: pockets
homepage: https://pockets.matteogassend.com
ids:
- pockets
repository:
owner: matfire
name: homebrew-matfire
token: "{{ .Env.GITHUB_TOKEN}}"
- name: pocketsctl
homepage: https://pockets.matteogassend.com
ids:
- pocketsctl
repository:
owner: matfire
name: homebrew-matfire
token: "{{ .Env.GITHUB_TOKEN}}"