3 Commits
v0.0.4 ... main

Author SHA1 Message Date
4099ae5b47 Update 'latest' tag using commit hash instead of version ref 2025-05-23 16:04:05 +02:00
643704d542 Remove release workflows and configuration 2025-05-23 16:00:21 +02:00
265107b66b Replace GoReleaser workflow with custom Release pipeline
Some checks failed
Release / goreleaser (push) Failing after 5m10s
2025-05-23 15:55:01 +02:00
3 changed files with 3 additions and 144 deletions

View File

@@ -1,37 +0,0 @@
name: goreleaser
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: stable
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v5
with:
distribution: goreleaser
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Update latest tag
run: |
git tag -f latest
git push -f origin latest

View File

@@ -1,106 +0,0 @@
# This is a GoReleaser configuration file
# For more information about configuration options, visit:
# https://goreleaser.com/customization/
version: 2
before:
hooks:
- go mod tidy
builds:
- env:
- CGO_ENABLED=0
goos:
- linux
- darwin
goarch:
- amd64
- arm64
flags:
- -trimpath
ldflags:
- -s -w
- -X git.mvl.sh/vleeuwenmenno/sshtunnel/cmd.Version={{.Version}}
- -X git.mvl.sh/vleeuwenmenno/sshtunnel/cmd.BuildDate={{.Date}}
mod_timestamp: "{{ .CommitTimestamp }}"
archives:
- format: tar.gz
name_template: >-
{{ .ProjectName }}_
{{- 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
checksum:
name_template: "checksums.txt"
snapshot:
name_template: "{{ incpatch .Version }}-next"
changelog:
sort: asc
filters:
exclude:
- "^docs:"
- "^test:"
# Homebrew formula
brews:
- repository:
owner: vleeuwenmenno
name: homebrew-tap
token: "{{ .Env.GITHUB_TOKEN }}"
directory: Formula
homepage: "https://git.mvl.sh/vleeuwenmenno/sshtunnel"
description: "SSH tunnel manager CLI tool"
license: "MIT"
commit_author:
name: goreleaserbot
email: goreleaser@carlosbecker.com
install: |
bin.install "sshtunnel"
# Generate shell completions
output = Utils.safe_popen_read("#{bin}/sshtunnel", "completion", "bash")
(bash_completion/"sshtunnel").write output
output = Utils.safe_popen_read("#{bin}/sshtunnel", "completion", "zsh")
(zsh_completion/"_sshtunnel").write output
output = Utils.safe_popen_read("#{bin}/sshtunnel", "completion", "fish")
(fish_completion/"sshtunnel.fish").write output
test: |
system "#{bin}/sshtunnel", "version"
# .deb and .rpm packages
nfpms:
- file_name_template: "{{ .ProjectName }}_{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}"
id: packages
homepage: https://git.mvl.sh/vleeuwenmenno/sshtunnel
description: |-
SSH tunnel manager CLI tool
maintainer: Menno van Leeuwen
license: MIT
vendor: vleeuwenmenno
formats:
- deb
- rpm
dependencies:
- openssh-client
recommends:
- bash-completion
scripts:
postinstall: |
sshtunnel completion bash > /usr/share/bash-completion/completions/sshtunnel
sshtunnel completion zsh > /usr/share/zsh/site-functions/_sshtunnel
sshtunnel completion fish > /usr/share/fish/vendor_completions.d/sshtunnel.fish
chmod 644 /usr/share/bash-completion/completions/sshtunnel || true
chmod 644 /usr/share/zsh/site-functions/_sshtunnel || true
chmod 644 /usr/share/fish/vendor_completions.d/sshtunnel.fish || true

View File

@@ -81,7 +81,9 @@ log_and_run git push origin "$NEXT_VERSION"
# Update the latest tag
printfe "%s\n" "cyan" "Updating 'latest' tag..."
log_and_run git tag -f latest "$NEXT_VERSION"
# Get the commit that the new version tag points to
COMMIT_HASH=$(git rev-parse "$NEXT_VERSION")
log_and_run git tag -f latest "$COMMIT_HASH"
log_and_run git push -f origin latest
printfe "%s\n" "green" "Successfully tagged and pushed version $NEXT_VERSION"