Skip to content

Commit bd4b9e5

Browse files
committed
fix(ci): added github ci for releasing
1 parent 3cf5542 commit bd4b9e5

8 files changed

Lines changed: 213 additions & 0 deletions

File tree

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
name: "\U0001F41B Bug Report"
3+
about: "If something isn't working as expected \U0001F914."
4+
title: ''
5+
labels: bug
6+
7+
---
8+
9+
<!---
10+
Hi there,
11+
12+
Thank you for opening an issue.
13+
--->
14+
15+
16+
### Used Release
17+
18+
19+
### Debug Output
20+
<!--Please provider a link to a GitHub Gist containing the complete debug output. Please do NOT paste the debug output in the issue; just paste a link to the Gist. And Please check the Debug Output for any Plain Text Credentials.-->
21+
22+
### Panic Output
23+
<!--If produced a panic, please provide a link to a GitHub Gist containing the output of the `crash.log`.-->
24+
25+
### Expected Behavior
26+
What should have happened?
27+
28+
### Actual Behavior
29+
What actually happened?
30+
31+
### Steps to Reproduce
32+
<!-- Please list the steps required to reproduce the issue, for example: -->
33+
34+
### Important Factoids
35+
<!-- Are there anything atypical about your accounts that we should know? For example: Running in EC2 Classic? Custom version of OpenStack? Tight ACLs?-->
36+
37+
### References
38+
<!--Are there any other GitHub issues (open or closed) or Pull Requests that should be linked here? For example:
39+
- GH-1234
40+
-->
41+
42+
### Community Note
43+
<!--- Please keep this note for the community --->
44+
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
45+
* If you are interested in working on this issue or have submitted a pull request, please leave a comment

.github/ISSUE_TEMPLATE/config.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
blank_issues_enabled: false
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
---
2+
name: "\U0001F680 Feature Request"
3+
about: "I have a suggestion (and might want to implement myself \U0001F642)!"
4+
title: ''
5+
labels: enhancement
6+
7+
---
8+
9+
10+
### Description
11+
12+
<!--- Please leave a helpful description of the feature request here. --->
13+
14+
### Potential Configuration
15+
16+
<!--- Information about code formatting: https://help.github.com/articles/basic-writing-and-formatting-syntax/#quoting-code --->
17+
18+
```hcl
19+
# Copy-paste your configurations here.
20+
```
21+
22+
### References
23+
24+
<!---
25+
Information about referencing Github Issues: https://help.github.com/articles/basic-writing-and-formatting-syntax/#referencing-issues-and-pull-requests
26+
27+
Are there any other GitHub issues (open or closed) or pull requests that should be linked here? Vendor blog posts or documentation?
28+
--->
29+
30+
<!--- Please keep this note for the community --->
31+
32+
### Community Note
33+
34+
* Please vote on this issue by adding a 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to the original issue to help the community and maintainers prioritize this request
35+
* If you are interested in working on this issue or have submitted a pull request, please leave a comment
36+
37+
<!--- Thank you for keeping this note for the community --->

.github/dependabot.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "daily"
7+
8+
- package-ecosystem: "pip"
9+
directory: "/"
10+
schedule:
11+
interval: "daily"
12+
13+
- package-ecosystem: "gitsubmodule"
14+
directory: "/"
15+
schedule:
16+
interval: "daily"
17+
18+
- package-ecosystem: "docker"
19+
directory: "/"
20+
schedule:
21+
interval: "daily"

.github/workflows/release.yml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
---
2+
on:
3+
push:
4+
tags:
5+
- "v*.*.*"
6+
7+
jobs:
8+
goreleaser:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Checkout
12+
uses: actions/checkout@v3
13+
with:
14+
fetch-depth: 0
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@v4
18+
19+
- name: Run GoReleaser
20+
uses: goreleaser/goreleaser-action@v4
21+
with:
22+
distribution: goreleaser
23+
version: latest
24+
args: release --rm-dist
25+
env:
26+
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
on:
3+
push:
4+
branches:
5+
- main
6+
7+
jobs:
8+
pre-commit:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-python@v3
13+
14+
- name: setup
15+
run: pip3 install pre-commit
16+
17+
- name: run pre-commit
18+
run: pre-commit run --show-diff-on-failure --all-files
19+
env:
20+
SKIP: "no-commit-to-branch"
21+
semantic-release:
22+
uses: rwxd/gh-templates/.github/workflows/common-semantic-release.yml@main
23+
secrets:
24+
token: ${{ secrets.GH_TOKEN }}

.goreleaser.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
builds:
3+
- env:
4+
- CGO_ENABLED=0
5+
mod_timestamp: "{{ .CommitTimestamp }}"
6+
flags:
7+
- -trimpath
8+
ldflags:
9+
- "-s -w"
10+
goos:
11+
- windows
12+
- linux
13+
- darwin
14+
goarch:
15+
- amd64
16+
- arm
17+
- arm64
18+
# ignore:
19+
# - goos: darwin
20+
# goarch: "386"
21+
# - goos: darwin
22+
# goarch: "arm64"
23+
binary: "{{ .ProjectName }}_v{{ .Version }}"
24+
archives:
25+
- format: binary
26+
name_template: "{{ .ProjectName }}_{{ .Version }}_{{ .Os }}_{{ .Arch }}"
27+
nfpms:
28+
- formats:
29+
- deb
30+
- rpm
31+
- archlinux
32+
checksum:
33+
name_template: "{{ .ProjectName }}_{{ .Version }}_SHA256SUMS"
34+
algorithm: sha256
35+
release:
36+
draft: false
37+
changelog:
38+
skip: true

.pre-commit-config.yaml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
repos:
3+
- repo: https://github.com/pre-commit/pre-commit-hooks
4+
rev: v4.2.0
5+
hooks:
6+
- id: trailing-whitespace
7+
- id: end-of-file-fixer
8+
- id: check-yaml
9+
- id: debug-statements
10+
- id: double-quote-string-fixer
11+
- id: requirements-txt-fixer
12+
- id: no-commit-to-branch
13+
14+
- repo: https://github.com/dnephin/pre-commit-golang
15+
rev: master
16+
hooks:
17+
- id: go-fmt
18+
- id: go-vet
19+
- id: go-mod-tidy
20+
- id: go-build

0 commit comments

Comments
 (0)