Skip to content

Commit a71bc23

Browse files
Merge pull request #183 from HashLoad/feat/modernize
Draft: chore: modernize code
2 parents e3313ac + ffc058b commit a71bc23

122 files changed

Lines changed: 4361 additions & 2414 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.editorconfig

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
# EditorConfig is awesome: https://EditorConfig.org
2+
3+
# top-most EditorConfig file
4+
root = true
5+
6+
[*]
7+
indent_style = space
8+
indent_size = 4
9+
end_of_line = lf
10+
charset = utf-8
11+
trim_trailing_whitespace = false
12+
insert_final_newline = false
13+
14+
[*.yml]
15+
indent_size = 2
16+
17+
[*.yaml]
18+
indent_size = 2
19+
20+
[*.md]
21+
trim_trailing_whitespace = true

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/lint.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/pre-commit.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: golangci-lint
2+
on:
3+
pull_request:
4+
push:
5+
branches: [main]
6+
7+
permissions:
8+
contents: read
9+
jobs:
10+
golangci:
11+
name: lint
12+
runs-on: ubuntu-latest
13+
steps:
14+
- uses: actions/checkout@v4
15+
- uses: jdx/mise-action@v2
16+
- uses: actions/setup-python@v5
17+
with:
18+
python-version: "3.11.4"
19+
- uses: pre-commit/action@v3.0.1

.github/workflows/release.yml

Lines changed: 48 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,56 @@
11
name: boss-release
2+
23
on:
34
push:
4-
branches: [ main ]
5+
branches:
6+
- main
57
tags:
6-
- 'v*'
8+
- v*
9+
10+
permissions:
11+
contents: write
712

813
jobs:
9-
build:
14+
goreleaser:
1015
runs-on: ubuntu-latest
1116
steps:
12-
- name: checkout
13-
uses: actions/checkout@v3
14-
- name: setup go
15-
uses: actions/setup-go@v3
16-
with:
17-
go-version: ~1.17.0
18-
- name: build
19-
run: |
20-
make dist && echo $(pwd)
21-
22-
- name: Release
23-
uses: softprops/action-gh-release@v1
24-
if: startsWith(github.ref, 'refs/tags/')
25-
with:
26-
files: |
27-
_dist/*.zip
28-
_dist/*.tar.gz`
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
with:
20+
fetch-depth: 0
21+
22+
- name: Set up tooling
23+
uses: jdx/mise-action@v2
24+
25+
- name: Run GoReleaser
26+
uses: goreleaser/goreleaser-action@v6
27+
with:
28+
distribution: goreleaser
29+
version: "~> v2"
30+
args: release --clean --auto-snapshot
31+
env:
32+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33+
34+
- uses: actions/upload-artifact@v4
35+
with:
36+
path: dist/boss_windows_amd64_v1/boss.exe
37+
if-no-files-found: warn
38+
39+
build-setup:
40+
runs-on: windows-latest
41+
needs: goreleaser
42+
steps:
43+
- name: Checkout
44+
uses: actions/checkout@v4
45+
with:
46+
fetch-depth: 0
47+
- uses: actions/download-artifact@v4
48+
49+
- name: Compile .ISS to .EXE Installer
50+
uses: Minionguyjpro/Inno-Setup-Action@v1.2.5
51+
env:
52+
VERSION: ${{ github.ref }}
53+
BIN_DIR: dist/boss_windows_amd64_v1/boss.exe
54+
with:
55+
path: ./assets/installer/boss.iss
56+
options: /O+

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,3 +37,7 @@ boss.json
3737
_dist
3838
bin/
3939
.env
40+
# Added by goreleaser init:
41+
dist/
42+
test_dir/
43+
.vscode/settings.json

0 commit comments

Comments
 (0)