Skip to content

Commit f22c348

Browse files
author
Shurco Dmitry
committed
🐎 ci: add goreleaser
1 parent ef57434 commit f22c348

File tree

6 files changed

+168
-1
lines changed

6 files changed

+168
-1
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
FROM jrottenberg/ffmpeg:6-alpine
2+
COPY stream-tools /bin/
3+
EXPOSE 8090
4+
ENTRYPOINT ["/bin/stream-tools"]
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: goreleaser
2+
3+
on:
4+
push:
5+
branches:
6+
- 'master'
7+
tags:
8+
- 'v*'
9+
10+
permissions:
11+
contents: write # needed to write releases
12+
packages: write # needed for ghcr access
13+
14+
jobs:
15+
goreleaser:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v3
19+
with:
20+
fetch-depth: 0
21+
- uses: docker/setup-qemu-action@v3
22+
- uses: docker/setup-buildx-action@v3
23+
- uses: docker/login-action@v2
24+
with:
25+
username: ${{ secrets.DOCKER_USERNAME }}
26+
password: ${{ secrets.DOCKER_PASSWORD }}
27+
- run: git fetch --force --tags
28+
- uses: actions/setup-go@v4
29+
with:
30+
go-version: stable
31+
- uses: goreleaser/goreleaser-action@v5
32+
with:
33+
distribution: goreleaser
34+
version: latest
35+
args: release --clean
36+
env:
37+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

β€Ž.goreleaser.ymlβ€Ž

Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
before:
2+
hooks:
3+
- go mod tidy
4+
- go mod download
5+
6+
builds:
7+
- env:
8+
- CGO_ENABLED=0
9+
- GO111MODULE=on
10+
goos:
11+
- linux
12+
goarch:
13+
- amd64
14+
ldflags:
15+
- -s -w
16+
main: ./main.go
17+
binary: stream-tools
18+
19+
checksum:
20+
name_template: "checksums.txt"
21+
22+
snapshot:
23+
name_template: "{{ .Tag }}-next"
24+
25+
changelog:
26+
sort: asc
27+
filters:
28+
exclude:
29+
- init
30+
- "^.*?ci:"
31+
- "^.*?test:"
32+
- "^.*?build(deps):"
33+
- "^.*?build:"
34+
- "README"
35+
- "Up"
36+
- "merge conflict"
37+
- Bump
38+
- Small fix
39+
- Update
40+
- Updating
41+
- Merge pull request
42+
- Merge remote-tracking branch
43+
- Merge branch
44+
- go mod tidy
45+
groups:
46+
- title: Dependency updates
47+
regexp: '^.*?(feat|fix)\(deps\)!?:.+$'
48+
order: 300
49+
- title: "New Features"
50+
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$'
51+
order: 100
52+
- title: "Security updates"
53+
regexp: '^.*?sec(\([[:word:]]+\))??!?:.+$'
54+
order: 150
55+
- title: "Bug fixes"
56+
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$'
57+
order: 200
58+
- title: "Documentation updates"
59+
regexp: ^.*?doc(\([[:word:]]+\))??!?:.+$
60+
order: 400
61+
- title: "Build process updates"
62+
regexp: ^.*?build(\([[:word:]]+\))??!?:.+$
63+
order: 400
64+
- title: Other work
65+
order: 9999
66+
67+
dockers:
68+
- image_templates:
69+
- "piplosmedia/stream-tools:v{{ .Version }}"
70+
dockerfile: .github/Dockerfile.goreleaser
71+
use: buildx
72+
build_flag_templates:
73+
- "--pull"
74+
- "--label=io.artifacthub.package.readme-url=https://raw.githubusercontent.com/piplos/stream-tools/main/README.md"
75+
- '--label=io.artifacthub.package.maintainers=[{"name":"Dmitry Shurco"}]'
76+
- "--label=io.artifacthub.package.license=MIT"
77+
- "--label=org.opencontainers.image.created={{.Date}}"
78+
- "--label=org.opencontainers.image.name={{.ProjectName}}"
79+
- "--label=org.opencontainers.image.revision={{.FullCommit}}"
80+
- "--label=org.opencontainers.image.version={{.Version}}"
81+
- "--label=org.opencontainers.image.source={{.GitURL}}"
82+
- "--label=org.opencontainers.image.url={{.GitURL}}"
83+
- "--platform=linux/amd64"
84+
goarch: amd64
85+
86+
docker_manifests:
87+
- name_template: "piplosmedia/stream-tools:latest"
88+
image_templates:
89+
- "piplosmedia/stream-tools:v{{ .Version }}"
90+
- name_template: "piplosmedia/stream-tools:v{{ .Version }}"
91+
image_templates:
92+
- "piplosmedia/stream-tools:v{{ .Version }}"
93+
94+
release:
95+
name_template: "v{{ .Version }}"
96+
footer: |
97+
**Full Changelog**: https://github.com/piplos/stream-tools/compare/{{ .PreviousTag }}...{{ .Tag }}

β€Ž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 (c) 2023
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 all
13+
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 THE
21+
SOFTWARE.

β€ŽREADME.mdβ€Ž

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
1+
<a href="https://github.com/piplos/stream-tools/releases"><img src="https://img.shields.io/github/v/release/piplos/stream-tools?sort=semver&label=Release&color=651FFF"></a>
2+
<a href="https://goreportcard.com/report/github.com/piplos/stream-tools"><img src="https://goreportcard.com/badge/github.com/piplos/stream-tools"></a>
3+
<a href="https://www.codefactor.io/repository/github/piplos/stream-tools"><img src="https://www.codefactor.io/repository/github/piplos/stream-tools/badge" alt="CodeFactor" /></a>
4+
<a href="https://github.com/piplos/stream-tools/actions/workflows/release.yml"><img src="https://github.com/piplos/stream-tools/actions/workflows/release.yml/badge.svg"></a>
5+
<a href="https://github.com/piplos/stream-tools/blob/master/LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg"></a>
6+
<a href="https://hub.docker.com/r/piplosmedia/stream-tools/"><img src="https://img.shields.io/docker/pulls/piplosmedia/stream-tools.svg"></a>
7+
<a href="https://hub.docker.com/r/piplosmedia/stream-tools/"><img src="https://img.shields.io/docker/image-size/piplosmedia/stream-tools/latest"></a>
8+
19
# stream-tools

β€Žgo.modβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
module proxy
1+
module github.com/piplos/stream-tools
22

33
go 1.21.3

0 commit comments

Comments
Β (0)