add goreleaser

This commit is contained in:
Gianni Carafa
2023-11-02 04:56:57 +01:00
parent fc9dc0df27
commit 366287180c
5 changed files with 94 additions and 3 deletions

40
.github/workflows/release-binaries.yaml vendored Normal file
View File

@@ -0,0 +1,40 @@
name: release binaries
on:
push:
#branches:
# - master
# Publish `v1.2.3` tags as releases.
tags:
- v*
workflow_dispatch:
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set version
run: |
echo -n $(git describe --tags --abbrev=0) > cmd/VERSION
-
name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21
-
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GORELEASER_GITHUB_TOKEN: ${{ secrets.GORELEASER_GITHUB_TOKEN }}

2
.gitignore vendored
View File

@@ -1,2 +1,4 @@
# dev binary # dev binary
ladder ladder
VERSION

42
.goreleaser.yaml Normal file
View File

@@ -0,0 +1,42 @@
# 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
builds:
-
main: cmd/main.go
binary: kubero
env:
- CGO_ENABLED=0
goos:
- linux
- windows
- darwin
archives:
- name_template: "{{ .ProjectName }}_{{ .Os }}_{{ .Arch }}"
format_overrides:
- goos: windows
format: zip
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^public:'
- '^.github:'
#brews:
# -
# repository:
# owner: kubero-dev
# name: homebrew-ladder
# token: "{{ .Env.GORELEASER_GITHUB_TOKEN }}"
# homepage: "https://www.kubero.dev"
# description: "Manage your kubero applications with the CLI"
# test: |
# system "#{bin}/kubero", "--version"

View File

@@ -4,7 +4,7 @@
<h1 align="center">Ladder</h1> <h1 align="center">Ladder</h1>
*Ladder is a web proxy to help bypass paywalls.* This is a selfhosted version of [1ft.io](1ft.io) and [12ft.io](https://12ft.io). It is inspired by [13ft](https://github.com/wasi-master/13ft). *Ladder is a web proxy to help bypass paywalls.* This is a selfhosted version of [1ft.io](https://1ft.io) and [12ft.io](https://12ft.io). It is inspired by [13ft](https://github.com/wasi-master/13ft).
### Why ### Why
@@ -33,6 +33,12 @@ Some site might have missing images or other formating issues. This is due to th
docker run -p 8080:8080 -d --name ladder ghcr.io/kubero-dev/ladder:latest docker run -p 8080:8080 -d --name ladder ghcr.io/kubero-dev/ladder:latest
``` ```
### Docker Compose
```bash
wget https://raw.githubusercontent.com/kubero-dev/ladder/main/docker-compose.yml
docker-compose up -d
```
## Configuration ## Configuration
### Environment Variables ### Environment Variables

View File

@@ -1,8 +1,9 @@
version: '3' version: '3'
services: services:
ladder: ladder:
build: . image: ghcr.io/kubero-dev/ladder:latest
container_name: ladder container_name: ladder
build: .
#restart: always #restart: always
#command: tail -f /dev/null #command: tail -f /dev/null
command: sh -c ./ladder command: sh -c ./ladder