Skip to content

Commit 04111c4

Browse files
.github/workflows: add release workflow
This adds a release flow that is triggered when a version tag is pushed and creates a GitHub release with a standard changelog. Updates #12 Signed-off-by: Gesa Stupperich <[email protected]>
1 parent 115deaf commit 04111c4

File tree

3 files changed

+47
-0
lines changed

3 files changed

+47
-0
lines changed

.github/workflows/release.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: release
2+
on:
3+
push:
4+
tags:
5+
- "v*"
6+
7+
permissions:
8+
contents: write
9+
10+
jobs:
11+
goreleaser:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout
15+
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
16+
with:
17+
fetch-depth: 0
18+
19+
- name: Run GoReleaser
20+
uses: goreleaser/goreleaser-action@e435ccd777264be153ace6237001ef4d979d3a7a # v6.4.0
21+
with:
22+
version: latest
23+
args: release --clean
24+
env:
25+
GITHUB_TOKEN: ${{ github.token }}

.goreleaser.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
builds:
2+
- skip: true
3+
4+
release:
5+
prerelease: auto
6+
7+
changelog:
8+
use: github
9+
filters:
10+
exclude:
11+
- "^build\\(deps\\)"
12+
- "^Bump"
13+
- "^.github"
14+
- "^.goreleaser"
15+
- "^scripts"

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,3 +53,10 @@ func main() {
5353
devices, err := client.Devices().List(context.Background())
5454
}
5555
```
56+
57+
## Releasing
58+
59+
Pushing a tag of the format `vX.Y.Z` will trigger the [release workflow](./.github/workflows/release.yml) which uses
60+
[goreleaser](https://github.com/goreleaser/goreleaser) to build and sign artifacts and generate a
61+
[GitHub release](https://github.com/tailscale/tailscale-client-go-v2/releases).
62+

0 commit comments

Comments
 (0)