Skip to content

Commit

Permalink
chore: hqs3scann3r -> xs3scann3r
Browse files Browse the repository at this point in the history
  • Loading branch information
enenumxela committed May 14, 2023
1 parent f1b0e3b commit a7a4ced
Show file tree
Hide file tree
Showing 17 changed files with 562 additions and 208 deletions.
1 change: 0 additions & 1 deletion .github/FUNDING.yml

This file was deleted.

32 changes: 32 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
# To get started with Dependabot version updates, you'll need to specify which
# package ecosystems to update and where the package manifests are located.
# Please see the documentation for all configuration options:
# https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file

version: 2
updates:
# Maintain dependencies for GitHub Actions
-
package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
target-branch: "dev"
commit-message:
prefix: "chore"
include: "scope"
labels:
- "Type: Maintenance"

# Maintain dependencies for go modules
-
package-ecosystem: "gomod"
directory: "/"
schedule:
interval: "weekly"
target-branch: "dev"
commit-message:
prefix: "chore"
include: "scope"
labels:
- "Type: Maintenance"
45 changes: 45 additions & 0 deletions .github/workflows/build-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: 🔨 Build Test

on:
push:
branches:
- "main"
paths:
- '**.go'
- '**.mod'
pull_request:
branches:
- "main"
paths:
- '**.go'
- '**.mod'
workflow_dispatch:

jobs:
build:
name: Build Test
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macOS-12]
runs-on: ${{ matrix.os }}
steps:
-
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '>=1.20'
-
name: Checkout the code
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Go modules hygine
run: |
go clean -modcache
go mod tidy
working-directory: .
-
name: Go build
run: go build -v .
working-directory: ./cmd/xs3scann3r
27 changes: 0 additions & 27 deletions .github/workflows/build.yml

This file was deleted.

40 changes: 40 additions & 0 deletions .github/workflows/lint-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: 💅 Lint Test

on:
push:
branches:
- "main"
paths:
- '**.go'
- '**.mod'
pull_request:
branches:
- "main"
paths:
- '**.go'
- '**.mod'
workflow_dispatch:

permissions:
contents: read

jobs:
lint:
name: Lint Test
runs-on: ubuntu-latest
steps:
-
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '>=1.20'
-
name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Run golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.52.2
39 changes: 17 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,40 +1,35 @@
name: release 🎉
name: 🎉 release

on:
create:
branches:
- main
tags:
- v*.*.*
workflow_dispatch:

jobs:
release:
name: release
name: Release
runs-on: ubuntu-latest
steps:
-
name: Check out code
name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '>=1.20'
-
name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 0
-
name: Set up Go
uses: actions/setup-go@v3
name: Run GoReleaser
uses: goreleaser/goreleaser-action@v4
with:
go-version: '>=1.17.0'
-
name: Get dependencies
run: |
go get -v -t -d ./...
if [ -f Gopkg.toml ]; then
curl https://raw.githubusercontent.com/golang/dep/master/install.sh | sh
dep ensure
fi
-
name: "Create release on GitHub"
uses: goreleaser/goreleaser-action@v3
args: "release --clean"
version: latest
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
with:
args: "release --rm-dist"
version: latest
distribution: goreleaser
SLACK_WEBHOOK: "${{ secrets.SLACK_WEBHOOK }}"
DISCORD_WEBHOOK_ID: "${{ secrets.DISCORD_WEBHOOK_ID }}"
DISCORD_WEBHOOK_TOKEN: "${{ secrets.DISCORD_WEBHOOK_TOKEN }}"
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Excutables

cmd/hqs3scann3r/hqs3scann3r
cmd/xs3scann3r/xs3scann3r

# Notes

Expand Down
61 changes: 61 additions & 0 deletions .golangci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
run:
issues-exit-code: 1

linters:
disable-all: true
enable:
- bodyclose
- depguard
- dogsled
- dupl
- errcheck
- exportloopref
- exhaustive
- goconst
- gocritic
- gofmt
- goimports
- gocyclo
- gosec
- gosimple
- govet
- ineffassign
- misspell
- nolintlint
- prealloc
- predeclared
- revive
- staticcheck
- stylecheck
- thelper
- tparallel
- typecheck
- unconvert
- unparam
- unused
- whitespace
- wsl

linters-settings:
errcheck:
check-type-assertions: true
goconst:
min-len: 2
min-occurrences: 3
gocritic:
enabled-tags:
- style
- diagnostic
- performance
- experimental
- opinionated
disabled-checks:
- captLocal
- octalLiteral
govet:
check-shadowing: true
enable:
- fieldalignment
nolintlint:
require-explanation: true
require-specific: true
41 changes: 39 additions & 2 deletions .goreleaser.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
before:
hooks:
- go mod tidy

builds:
-
binary: hqs3scann3r
main: cmd/hqs3scann3r/main.go
id: xs3scann3r-cli
main: cmd/xs3scann3r/main.go
binary: xs3scann3r

env:
- CGO_ENABLED=0

goos:
- linux
- windows
Expand All @@ -11,14 +20,42 @@ builds:
- 386
- arm
- arm64
ignore:
-
goos: darwin
goarch: 386
-
goos: windows
goarch: arm
-
goos: windows
goarch: arm64

flags:
- -trimpath

archives:
-
id: tgz
builds: [xs3scann3r-cli]
format: tar.gz
replacements:
darwin: macOS
format_overrides:
-
goos: windows
format: zip

checksum:
algorithm: sha256

announce:
slack:
enabled: true
channel: '#release'
username: GoReleaser
message_template: 'New Release: {{ .ProjectName }} {{.Tag}} is published! Check it out at {{ .ReleaseURL }}'

discord:
enabled: true
message_template: '**New Release: {{ .ProjectName }} {{.Tag}}** is published! Check it out at {{ .ReleaseURL }}'
Loading

0 comments on commit a7a4ced

Please sign in to comment.