Skip to content

Commit da7180e

Browse files
authored
feat: Add Release Cycles (#18)
* feat: Add Releaser * feat: Second Release
1 parent 304fb76 commit da7180e

3 files changed

Lines changed: 79 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: release
2+
on:
3+
push:
4+
tags:
5+
- 'v*'
6+
7+
jobs:
8+
release:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v4
12+
13+
- name: Set up Go
14+
uses: actions/setup-go@v4
15+
with:
16+
go-version: '1.25.5'
17+
18+
- name: Build
19+
run: go build -v ./...
20+
21+
- name: Test
22+
run: go test -v ./...
23+
24+
- uses: goreleaser/goreleaser-action@v2
25+
if: success() && startsWith(github.ref, 'refs/tags/')
26+
with:
27+
version: latest
28+
args: release
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GH_PAT }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
bin/*
2+
dist/*

.goreleaser.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# The lines below are called `modelines`. See `:help modeline`
2+
# Feel free to remove those if you don't want/need to use them.
3+
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
4+
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
5+
6+
version: 2
7+
8+
project_name: mux-session
9+
10+
before:
11+
hooks:
12+
- go mod tidy
13+
14+
builds:
15+
- env:
16+
- CGO_ENABLED=0
17+
goos:
18+
- linux
19+
- darwin
20+
21+
archives:
22+
- formats: [tar.gz]
23+
# this name template makes the OS and Arch compatible with the results of `uname`.
24+
name_template: >-
25+
{{ .ProjectName }}_
26+
{{- title .Os }}_
27+
{{- if eq .Arch "amd64" }}x86_64
28+
{{- else if eq .Arch "386" }}i386
29+
{{- else }}{{ .Arch }}{{ end }}
30+
{{- if .Arm }}v{{ .Arm }}{{ end }}
31+
# use zip for windows archives
32+
format_overrides:
33+
- goos: windows
34+
formats: [zip]
35+
36+
changelog:
37+
sort: asc
38+
filters:
39+
exclude:
40+
- "^docs:"
41+
- "^test:"
42+
43+
release:
44+
footer: >-
45+
46+
---
47+
48+
Released by [GoReleaser](https://github.com/goreleaser/goreleaser).

0 commit comments

Comments
 (0)