Skip to content

Commit

Permalink
Add release automation
Browse files Browse the repository at this point in the history
  • Loading branch information
daenney committed Mar 12, 2024
1 parent 2470f4f commit d15b5eb
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
26 changes: 26 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: release
on:
push:
tags:
- 'v*'

jobs:
release:
permissions:
packages: write
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v4
with:
go-version: '1.22'
- name: Build and release
uses: goreleaser/goreleaser-action@v5
with:
version: latest
args: release --clean
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
25 changes: 25 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
builds:
- id: daemon
binary: gopherxlr
mod_timestamp: '{{ .CommitTimestamp }}'
flags:
- -trimpath
ldflags:
- -s
- -w
- -X main.version={{.Version}} -X main.commit={{.FullCommit}} -X main.date={{.CommitDate}}
goos:
- linux
goarch:
- amd64
- arm64
archives:
- id: daemon
builds:
- daemon
wrap_in_directory: true
files:
- LICENSE
- README.md
- examples/*
- systemd/*

0 comments on commit d15b5eb

Please sign in to comment.