Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit5d60af9

Browse files
authored
Merge pull request#195 from dharsanb/master
Add goreleaser
2 parents48999d7 +5dc1b69 commit5d60af9

File tree

3 files changed

+98
-0
lines changed

3 files changed

+98
-0
lines changed

‎.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name:release
2+
3+
on:
4+
push:
5+
tags:
6+
-'v[0-9]+.[0-9]+.[0-9]+'
7+
8+
permissions:
9+
contents:write
10+
jobs:
11+
release:
12+
runs-on:ubuntu-latest
13+
steps:
14+
-name:Checkout
15+
uses:actions/checkout@v4
16+
with:
17+
fetch-depth:0
18+
19+
-name:Set up Go
20+
uses:actions/setup-go@v5
21+
with:
22+
go-version-file:'go.mod'
23+
check-latest:true
24+
25+
-name:Run GoReleaser
26+
uses:goreleaser/goreleaser-action@v6
27+
with:
28+
distribution:goreleaser
29+
version:"~> v2"
30+
args:release --clean
31+
env:
32+
GITHUB_TOKEN:${{ secrets.GITHUB_TOKEN }}

‎.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,3 +10,5 @@ dist
1010

1111
# Vendor directory
1212
vendor
13+
# Added by goreleaser init:
14+
dist/

‎.goreleaser.yaml

Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
1+
# This is an example .goreleaser.yml file with some sensible defaults.
2+
# Make sure to check the documentation at https://goreleaser.com
3+
4+
# The lines below are called `modelines`. See `:help modeline`
5+
# Feel free to remove those if you don't want/need to use them.
6+
# yaml-language-server: $schema=https://goreleaser.com/static/schema.json
7+
# vim: set ts=2 sw=2 tw=0 fo=cnqoj
8+
9+
version:2
10+
11+
before:
12+
hooks:
13+
# You may remove this if you don't use go modules.
14+
-go mod tidy
15+
# you may remove this if you don't need go generate
16+
-go generate ./...
17+
# you may remove this if you don't need go generate
18+
-go mod vendor
19+
20+
builds:
21+
-id:dstask
22+
binary:dstask
23+
main:cmd/dstask/main.go
24+
env:
25+
-CGO_ENABLED=0
26+
ldflags:
27+
-s -w
28+
-X \"github.com/naggie/dstask.GIT_COMMIT={{.Commit}}\"
29+
-X \"github.com/naggie/dstask.VERSION={{.Version}}\"
30+
-X \"github.com/naggie/dstask.BUILD_DATE={{.Date}}\"
31+
targets:
32+
-linux_arm_v5
33+
-linux_amd64
34+
-darwin_arm64
35+
-darwin_amd64
36+
37+
-id:dstask-import
38+
binary:dstask-import
39+
main:cmd/dstask-import/main.go
40+
env:
41+
-CGO_ENABLED=0
42+
ldflags:
43+
-s -w
44+
-X \"github.com/naggie/dstask.GIT_COMMIT={{.Commit}}\"
45+
-X \"github.com/naggie/dstask.VERSION={{.Version}}\"
46+
-X \"github.com/naggie/dstask.BUILD_DATE={{.Date}}\"
47+
targets:
48+
-linux_arm_v5
49+
-linux_amd64
50+
-darwin_arm64
51+
-darwin_amd64
52+
53+
archives:
54+
-formats:[binary]
55+
56+
checksum:
57+
name_template:checksums.sha256
58+
59+
changelog:
60+
sort:asc
61+
filters:
62+
exclude:
63+
-"^docs:"
64+
-"^test:"

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp