Skip to content
This repository was archived by the owner on Aug 29, 2024. It is now read-only.

Commit da72f6d

Browse files
Add goreleaser
1 parent fa219a0 commit da72f6d

2 files changed

Lines changed: 44 additions & 0 deletions

File tree

.github/workflows/release.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: 'Version'
8+
required: true
9+
type: string
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
release:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Validate
19+
run: |
20+
if ! [[ "${{ inputs.version }}" =~ ^v[0-9]+\.[0-9]+\.[0-9]+$ ]]; then
21+
exit 1
22+
fi
23+
- uses: actions/checkout@v3
24+
with:
25+
fetch-depth: 0
26+
- name: Create and push tag
27+
run: |
28+
git tag ${{ inputs.version }}
29+
git push origin --tags
30+
- uses: goreleaser/goreleaser-action@v4
31+
with:
32+
distribution: goreleaser
33+
version: latest
34+
args: release
35+
env:
36+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.goreleaser.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
project_name: stackerr
2+
before:
3+
hooks:
4+
- go mod tidy
5+
builds:
6+
- skip: true
7+
changelog:
8+
sort: asc

0 commit comments

Comments
 (0)