Skip to content

Commit

Permalink
feat: Enable publishing releases
Browse files Browse the repository at this point in the history
  • Loading branch information
notheotherben committed Jan 30, 2024
1 parent 73efab7 commit ea1daed
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Release

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
os: [linux, darwin, windows]
arch: [amd64, arm64]
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.21
- name: Build
run: |
go build -v -o tailservice-${{ matrix.os }}-${{ matrix.arch }} -ldflags="-X 'cmd.Version=${{ github.event.release.tag_name }}'" main.go
env:
GOOS: ${{ matrix.os }}
GOARCH: ${{ matrix.arch }}

- name: Upload Release Assets
uses: SierraSoftworks/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
overwrite: true
files: |
tailservice-${{ matrix.os }}-${{ matrix.arch }}
4 changes: 4 additions & 0 deletions cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,16 @@ import (

var config proxy.Config

var Version = "dev"

var rootCmd = &cobra.Command{
Use: "tailservice",
Short: "Easily expose services on your Tailscale network.",
Long: `Tailservice uses the tsnet library to expose a dedicated service on your
Tailscale network as its own individual node. This allows you to easily access
it using the corresponding service name (if you have MagicDNS enabled).`,
Version: Version,
Example: `tailservice --name my-service --tcp 80:8080 --udp 53:8.8.4.4:53 --tls 443:example.com:80 --tls 8443:https://example.com`,
Run: func(cmd *cobra.Command, args []string) {
listeners := []proxy.Listener{}

Expand Down

0 comments on commit ea1daed

Please sign in to comment.