-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9 from HotaruBlaze/dev
Merge Dev into Main
- Loading branch information
Showing
45 changed files
with
2,315 additions
and
1,263 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,55 +10,129 @@ env: | |
IMAGE_NAME: gotes3mp | ||
|
||
jobs: | ||
build-linux: | ||
name: Build Linux | ||
build-linux-x64: | ||
name: Build Linux - x64 | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
discussions: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v3 | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ^1.20 | ||
go-version: ^1.22 | ||
stable: true | ||
id: linux-build | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v3 | ||
- name: Generate go files | ||
run: | | ||
cd src | ||
go install google.golang.org/protobuf/cmd/protoc-gen-go | ||
go get google.golang.org/grpc/cmd/protoc-gen-go-grpc | ||
export PATH="$PATH:$(go env GOPATH)/bin" | ||
go generate | ||
cd .. | ||
- name: Run Tests | ||
run: go test ./src/... | ||
- name: Build-Linux | ||
run: go build -ldflags="-X 'main.Build=${{ github.event.release.tag_name }}' -X 'main.GitCommit=$GITHUB_SHA'" -o build/goTES3MP-Linux src/*.go | ||
run: | | ||
cd src | ||
CGO_ENABLED=0 go build -ldflags="-X 'main.Build=${{ github.event.release.tag_name }}' -X 'main.GitCommit=$GITHUB_SHA'" -o ../build/goTES3MP_Linux_amd64 . | ||
- name: Generate default config | ||
run: cd build/ &&chmod +x goTES3MP-Linux && ./goTES3MP-Linux | ||
|
||
run: cd build/ && chmod +x goTES3MP_Linux_amd64 && ./goTES3MP_Linux_amd64 | ||
- name: GH Release | ||
uses: softprops/[email protected].5 | ||
uses: softprops/[email protected].15 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
files: | | ||
build/goTES3MP-Linux | ||
build/goTES3MP_Linux_amd64 | ||
build/config.yaml | ||
build-linux-aarch64: | ||
name: Build Linux - aarch64 | ||
runs-on: self-hosted | ||
permissions: | ||
contents: write | ||
discussions: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v4 | ||
with: | ||
go-version: ^1.22 | ||
stable: true | ||
id: linux-build | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v3 | ||
- name: Generate go files | ||
run: | | ||
cd src | ||
go install google.golang.org/protobuf/cmd/protoc-gen-go | ||
go get google.golang.org/grpc/cmd/protoc-gen-go-grpc | ||
export PATH="$PATH:$(go env GOPATH)/bin" | ||
go generate | ||
cd .. | ||
- name: Run Tests | ||
run: go test ./src/... | ||
- name: Build-Linux | ||
run: | | ||
cd src | ||
CGO_ENABLED=0 go build -ldflags="-X 'main.Build=${{ github.event.release.tag_name }}' -X 'main.GitCommit=${GITHUB_SHA}'" -o ../build/goTES3MP-Linux-aarch64 . | ||
- name: Generate default config | ||
run: cd build/ && chmod +x goTES3MP-Linux-aarch64 && ./goTES3MP-Linux-aarch64 | ||
- name: GH Release | ||
uses: softprops/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
files: | | ||
build/goTES3MP-Linux-aarch64 | ||
build/config.yaml | ||
build-windows: | ||
name: Build Windows | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
discussions: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Go 1.x | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: ^1.20 | ||
go-version: ^1.22 | ||
stable: true | ||
id: windows-build | ||
- name: Install Protoc | ||
uses: arduino/setup-protoc@v3 | ||
- name: Generate go files | ||
run: | | ||
cd src | ||
go install google.golang.org/protobuf/cmd/protoc-gen-go | ||
go get google.golang.org/grpc/cmd/protoc-gen-go-grpc | ||
export PATH="$PATH:$(go env GOPATH)/bin" | ||
go generate | ||
cd .. | ||
- name: Run Tests | ||
run: go test ./src | ||
- name: Build-Windows | ||
run: GOOS=windows GOARCH=amd64 go build -ldflags="-X 'main.Build=${{ github.event.release.tag_name }}' -X 'main.GitCommit=$GITHUB_SHA'" -o build/goTES3MP-Windows.exe src/*.go | ||
|
||
run: | | ||
cd src | ||
CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -ldflags="-X 'main.Build=${{ github.event.release.tag_name }}' -X 'main.GitCommit=$GITHUB_SHA'" -o build/goTES3MP-Windows-amd64.exe . | ||
- name: GH Release | ||
uses: softprops/[email protected] | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
files: build/goTES3MP-Windows.exe | ||
files: build/goTES3MP-Windows-amd64.exe | ||
|
||
add-scripts: | ||
name: Add Scripts | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
discussions: write | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
|
@@ -77,27 +151,25 @@ jobs: | |
|
||
build-dockerImage: | ||
runs-on: ubuntu-latest | ||
# If running with act, Uncomment below | ||
# container: phaze9/action-runner | ||
env: | ||
DOCKER_CONFIG: $HOME/.docker | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Set up Docker Buildx | ||
id: buildx | ||
uses: docker/setup-buildx-action@v1 | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Login to ghcr.io | ||
uses: docker/login-action@v1 | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ${{ env.IMAGE_REGISTRY }} | ||
username: ${{ env.IMAGE_OWNER }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Build Docker Image | ||
id: docker_build_x64 | ||
uses: docker/build-push-action@v2 | ||
uses: docker/build-push-action@v5 | ||
with: | ||
push: true | ||
platforms: linux/amd64 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Test PR | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
- dev | ||
|
||
jobs: | ||
test: | ||
name: Test PR | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: ^1.22 | ||
stable: true | ||
|
||
- name: Generate go files | ||
run: go generate | ||
|
||
- name: Install dependencies | ||
run: go mod download | ||
|
||
- name: Run Tests | ||
run: go test -v ./src |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,4 +2,5 @@ goTES3MP/logs/ | |
build/ | ||
config.yaml | ||
goTES3MP/data.json | ||
version.go | ||
.vscode/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,38 +1,48 @@ | ||
module github.com/hotarublaze/gotes3mp | ||
|
||
go 1.20 | ||
go 1.22 | ||
|
||
require ( | ||
github.com/bwmarrin/discordgo v0.27.1 | ||
github.com/fatih/color v1.15.0 | ||
github.com/fsnotify/fsnotify v1.6.0 | ||
github.com/bwmarrin/discordgo v0.27.2-0.20230816134654-ff9176adccb6 | ||
github.com/fatih/color v1.16.0 | ||
github.com/fsnotify/fsnotify v1.7.0 | ||
github.com/golang/protobuf v1.5.4 | ||
github.com/google/go-github v17.0.0+incompatible | ||
github.com/google/uuid v1.6.0 | ||
github.com/hashicorp/go-version v1.6.0 | ||
github.com/sirupsen/logrus v1.9.0 | ||
github.com/spf13/viper v1.15.0 | ||
github.com/sirupsen/logrus v1.9.3 | ||
github.com/spf13/viper v1.18.2 | ||
github.com/stretchr/testify v1.8.4 | ||
github.com/thoj/go-ircevent v0.0.0-20210723090443-73e444401d64 | ||
github.com/tidwall/pretty v1.2.1 | ||
golang.org/x/exp v0.0.0-20230510235704-dd950f8aeaea | ||
golang.org/x/exp v0.0.0-20240213143201-ec583247a57a | ||
google.golang.org/protobuf v1.33.0 | ||
) | ||
|
||
require ( | ||
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect | ||
github.com/google/go-querystring v1.1.0 // indirect | ||
github.com/gorilla/websocket v1.5.0 // indirect | ||
github.com/gorilla/websocket v1.5.1 // indirect | ||
github.com/hashicorp/hcl v1.0.0 // indirect | ||
github.com/magiconair/properties v1.8.7 // indirect | ||
github.com/mattn/go-colorable v0.1.13 // indirect | ||
github.com/mattn/go-isatty v0.0.18 // indirect | ||
github.com/mattn/go-isatty v0.0.20 // indirect | ||
github.com/mitchellh/mapstructure v1.5.0 // indirect | ||
github.com/pelletier/go-toml/v2 v2.0.7 // indirect | ||
github.com/spf13/afero v1.9.5 // indirect | ||
github.com/spf13/cast v1.5.0 // indirect | ||
github.com/spf13/jwalterweatherman v1.1.0 // indirect | ||
github.com/pelletier/go-toml/v2 v2.1.1 // indirect | ||
github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect | ||
github.com/sagikazarmark/locafero v0.4.0 // indirect | ||
github.com/sagikazarmark/slog-shim v0.1.0 // indirect | ||
github.com/sourcegraph/conc v0.3.0 // indirect | ||
github.com/spf13/afero v1.11.0 // indirect | ||
github.com/spf13/cast v1.6.0 // indirect | ||
github.com/spf13/pflag v1.0.5 // indirect | ||
github.com/subosito/gotenv v1.4.2 // indirect | ||
golang.org/x/crypto v0.9.0 // indirect | ||
golang.org/x/net v0.10.0 // indirect | ||
golang.org/x/sys v0.8.0 // indirect | ||
golang.org/x/text v0.9.0 // indirect | ||
github.com/subosito/gotenv v1.6.0 // indirect | ||
go.uber.org/multierr v1.11.0 // indirect | ||
golang.org/x/crypto v0.19.0 // indirect | ||
golang.org/x/net v0.21.0 // indirect | ||
golang.org/x/sys v0.17.0 // indirect | ||
golang.org/x/text v0.14.0 // indirect | ||
google.golang.org/grpc/cmd/protoc-gen-go-grpc v1.3.0 // indirect | ||
gopkg.in/ini.v1 v1.67.0 // indirect | ||
gopkg.in/yaml.v3 v3.0.1 // indirect | ||
) |
Oops, something went wrong.