Skip to content

Commit e04a7eb

Browse files
committed
Add LICENSE and GitHub Actions release workflow
1 parent 9b03693 commit e04a7eb

File tree

3 files changed

+98
-0
lines changed

3 files changed

+98
-0
lines changed

.github/workflows/release.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: goreleaser
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
8+
jobs:
9+
goreleaser:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
- name: Set up Go
17+
uses: actions/setup-go@v2
18+
with:
19+
go-version: 1.17
20+
- name: Run GoReleaser
21+
uses: goreleaser/goreleaser-action@v2
22+
with:
23+
version: latest
24+
args: release --rm-dist
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
27+
HOMEBREW_TAP_GITHUB_TOKEN: ${{ secrets.HOMEBREW_TAP_GITHUB_TOKEN }}

.goreleaser.yml

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
before:
2+
hooks:
3+
- go mod tidy
4+
builds:
5+
- env:
6+
- CGO_ENABLED=0
7+
mod_timestamp: "{{ .CommitTimestamp }}"
8+
flags:
9+
- -trimpath
10+
ldflags:
11+
- "-s -w -X main.version={{.Version}} -X main.commit={{.Commit}} -X main.date={{.Date}}"
12+
goos:
13+
- freebsd
14+
- windows
15+
- linux
16+
- darwin
17+
goarch:
18+
- amd64
19+
- "386"
20+
- arm
21+
- arm64
22+
binary: docker-credential-env
23+
archives:
24+
- format: zip
25+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
26+
snapshot:
27+
name_template: "{{ .Tag }}-next"
28+
checksum:
29+
name_template: "{{ .ProjectName }}_{{ .Version }}_SHA256SUMS"
30+
algorithm: sha256
31+
release:
32+
draft: false
33+
changelog:
34+
sort: asc
35+
filters:
36+
exclude:
37+
- "^docs:"
38+
- "^test:"
39+
brews:
40+
- tap:
41+
owner: isometry
42+
name: homebrew-tap
43+
token: "{{ .Env.HOMEBREW_TAP_GITHUB_TOKEN }}"
44+
folder: Formula
45+
description: Environment-driven Docker credential helper
46+
homepage: https://just.breathe.io/project/docker-credential-env/
47+
test: |
48+
system "#{bin}/docker-credential-env --version"
49+
install: |
50+
bin.install "docker-credential-env"

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
The MIT License (MIT)
2+
3+
Copyright © 2021 Robin Breathe <[email protected]>
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in
13+
all copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21+
THE SOFTWARE.

0 commit comments

Comments
 (0)