Skip to content

Commit 49ddf8b

Browse files
feat: Initial Commit
0 parents  commit 49ddf8b

File tree

10 files changed

+1264
-0
lines changed

10 files changed

+1264
-0
lines changed

.github/workflows/release.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Release
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@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Set up Go
18+
uses: actions/setup-go@v4
19+
with:
20+
go-version: '>=1.21'
21+
cache: true
22+
23+
- name: Run GoReleaser
24+
uses: goreleaser/goreleaser-action@v5
25+
with:
26+
distribution: goreleaser
27+
version: latest
28+
args: release --clean
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/tag.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Create Tag
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
tag:
10+
runs-on: ubuntu-latest
11+
steps:
12+
- name: Checkout
13+
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 0
16+
17+
- name: Setup Node.js
18+
uses: actions/setup-node@v4
19+
with:
20+
node-version: '20'
21+
22+
- name: Install dependencies
23+
run: npm install -g semantic-release @semantic-release/git @semantic-release/github
24+
25+
- name: Create tag
26+
env:
27+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
28+
run: npx semantic-release

.gitignore

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
# Binaries for programs and plugins
2+
*.exe
3+
*.exe~
4+
*.dll
5+
*.so
6+
*.dylib
7+
main
8+
cloudsmith-credential-provider*
9+
dist/
10+
11+
# Test binary, built with `go test -c`
12+
*.test
13+
14+
# Output of the go coverage tool
15+
*.out
16+
17+
# Go workspace file
18+
go.work
19+
20+
# IDE specific files
21+
.idea/
22+
.vscode/
23+
*.swp
24+
*.swo
25+
26+
# OS specific files
27+
.DS_Store
28+
.DS_Store?
29+
._*
30+
.Spotlight-V100
31+
.Trashes
32+
ehthumbs.db
33+
Thumbs.db
34+
35+
# Project specific files
36+
token.txt
37+
cloudsmith-credential-provider.yaml
38+
request.json

.goreleaser.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
before:
2+
hooks:
3+
- go mod tidy
4+
5+
builds:
6+
- env:
7+
- CGO_ENABLED=0
8+
goos:
9+
- linux
10+
goarch:
11+
- amd64
12+
- arm64
13+
ldflags:
14+
- -s -w
15+
- -X main.version={{.Version}}
16+
- -X main.commit={{.Commit}}
17+
- -X main.date={{.Date}}
18+
mod_timestamp: '{{ .CommitTimestamp }}'
19+
binary: cloudsmith-kubernetes-credential-provider
20+
21+
archives:
22+
- format: tar.gz
23+
name_template: >-
24+
{{ .ProjectName }}_
25+
{{- title .Os }}_
26+
{{- if eq .Arch "amd64" }}x86_64
27+
{{- else }}{{ .Arch }}{{ end }}
28+
format_overrides:
29+
- goos: windows
30+
format: zip
31+
32+
changelog:
33+
sort: asc
34+
filters:
35+
exclude:
36+
- '^docs:'
37+
- '^test:'
38+
- '^Merge pull request'
39+
40+
release:
41+
draft: true
42+
43+
checksum:
44+
name_template: 'checksums.txt'
45+
algorithm: sha256
46+
47+
version: 1

.pre-commit-config.yaml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
repos:
2+
- repo: https://github.com/pre-commit/pre-commit-hooks
3+
rev: v4.4.0
4+
hooks:
5+
- id: trailing-whitespace
6+
- id: end-of-file-fixer
7+
- id: check-yaml
8+
- id: check-added-large-files
9+
10+
- repo: https://github.com/dnephin/pre-commit-golang
11+
rev: v0.5.1
12+
hooks:
13+
- id: go-fmt
14+
- id: go-vet
15+
- id: go-lint
16+
- id: go-imports
17+
- id: validate-toml
18+
- id: no-go-testing
19+
- id: golangci-lint
20+
- id: go-critic
21+
- id: go-unit-tests

.releaserc.json

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
"branches": ["master"],
3+
"plugins": [
4+
"@semantic-release/commit-analyzer",
5+
"@semantic-release/release-notes-generator",
6+
"@semantic-release/github",
7+
["@semantic-release/git", {
8+
"assets": [],
9+
"message": "chore(release): ${nextRelease.version} [skip ci]\n\n${nextRelease.notes}"
10+
}]
11+
]
12+
}

0 commit comments

Comments
 (0)