Skip to content

Commit

Permalink
Add goreleaser pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
nateinaction committed Jul 16, 2024
1 parent 3cbaa0e commit 8992870
Show file tree
Hide file tree
Showing 3 changed files with 78 additions and 15 deletions.
26 changes: 11 additions & 15 deletions .github/workflows/goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,37 +1,33 @@
name: goreleaser

on:
pull_request:
push:
branches:
- main
tags:
- "*"

permissions:
contents: write
# packages: write
# issues: write

jobs:
goreleaser:
runs-on: ubuntu-latest
steps:
-
name: Checkout
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
-
name: Set up Go
- name: Set up Go
uses: actions/setup-go@v5
-
name: Run GoReleaser
with:
go-version: stable
- name: Run GoReleaser
uses: goreleaser/goreleaser-action@v6
with:
distribution: goreleaser
version: '~> v2'
version: "v2.1.0"
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
-
name: Upload assets
uses: actions/upload-artifact@v3
with:
name: myapp
path: myfolder/dist/*
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.vscode
bin/
dist/
66 changes: 66 additions & 0 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
# vim: set ts=2 sw=2 tw=0 fo=cnqoj

version: 2

before:
hooks:
- go mod tidy

builds:
- env:
- CGO_ENABLED=0
goos:
- linux
goarch:
- arm
goarm:
- 7

report_sizes: true

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 }}
files:
- LICENSE.md
- README.md
- pikvm-tailscale-cert-renewer.service

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

gomod:
proxy: true
env:
- GOPROXY=https://proxy.golang.org,direct
- GOSUMDB=sum.golang.org
mod: mod
# gobinary: go1.22.5

# .goreleaser.yaml
release:
github:
owner: nateinaction
name: pikvm-tailscale-cert-renewer

# TODO: Remove when comfortable with goreleaser setup
draft: true

# Will mark the release as not ready for production in case
# there is an indicator for this in the tag e.g. v1.0.0-rc1
prerelease: auto

# Header for the release body.
header: |
## PiKVM Tailscale Cert Renewer

0 comments on commit 8992870

Please sign in to comment.