generated from habedi/template-go-project
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Updated the code so all the linters pass. - Updated `README.md` and improved the badge styles. - Updated `CONTRIBUTING.md` and added licensing information for pull requests. - Updated `.editorconfig` to cover YAML and Go files correctly. - Updated GitHub workflows and removed unnecessary comments.
- Loading branch information
Showing
17 changed files
with
443 additions
and
444 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
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,44 +1,38 @@ | ||
name: Linux Build | ||
|
||
on: | ||
workflow_dispatch: # Enable manual execution | ||
workflow_dispatch: # Allow manual execution | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
# Checkout the repository | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
# Set up Go | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.23 | ||
|
||
# Install dependencies and run the tests | ||
- name: Install Dependencies | ||
run: | | ||
sudo apt-get install -y make | ||
make format | ||
make test | ||
continue-on-error: false | ||
|
||
# Build the application | ||
- name: Build for Linux | ||
run: | | ||
make build | ||
continue-on-error: false | ||
|
||
# Debug: List Build Directory | ||
- name: List Build Directory | ||
run: ls -R bin | ||
|
||
# Upload Build Artifact | ||
- name: Upload Build Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: gogg-linux-amd64 | ||
path: 'bin/gogg' | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.23 | ||
|
||
- name: Install Dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y make | ||
make test | ||
continue-on-error: false | ||
|
||
- name: Build for Linux | ||
run: | | ||
make build | ||
continue-on-error: false | ||
|
||
- name: List Build Directory (for Debugging) | ||
run: ls -R bin | ||
|
||
- name: Upload Build Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: gogg-linux-amd64 | ||
path: 'bin/gogg' |
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,44 +1,37 @@ | ||
name: MacOS Build | ||
|
||
on: | ||
workflow_dispatch: # Enable manual execution | ||
workflow_dispatch: # Allow manual execution | ||
|
||
jobs: | ||
build: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
# Checkout the repository | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
# Set up Go | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.23 | ||
|
||
# Install dependencies and run the tests | ||
- name: Install Dependencies | ||
run: | | ||
brew install make | ||
make format | ||
make test | ||
continue-on-error: false | ||
|
||
# Build the application | ||
- name: Build for MacOS | ||
run: | | ||
make build-macos | ||
continue-on-error: false | ||
|
||
# Debug: List Build Directory | ||
- name: List Build Directory | ||
run: ls -R bin | ||
|
||
# Upload Build Artifact | ||
- name: Upload Build Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: gogg-macos-universal | ||
path: 'bin/gogg' | ||
build: | ||
runs-on: macos-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.23 | ||
|
||
- name: Install Dependencies | ||
run: | | ||
brew install make | ||
make test | ||
continue-on-error: false | ||
|
||
- name: Build for MacOS | ||
run: | | ||
make build-macos | ||
continue-on-error: false | ||
|
||
- name: List Build Directory (for Debugging) | ||
run: ls -R bin | ||
|
||
- name: Upload Build Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: gogg-macos-universal | ||
path: 'bin/gogg' |
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,44 +1,37 @@ | ||
name: Windows Build | ||
|
||
on: | ||
workflow_dispatch: # Enable manual execution | ||
workflow_dispatch: # Allow manual execution | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
# Checkout the repository | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
# Set up Go | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.23 | ||
|
||
# Install dependencies and run the tests | ||
- name: Install Dependencies | ||
run: | | ||
choco install make -y | ||
make format | ||
make test | ||
continue-on-error: false | ||
|
||
# Build the application | ||
- name: Build for Windows | ||
run: | | ||
make build GOGG_BINARY=gogg.exe | ||
continue-on-error: false | ||
|
||
# Debug: List Build Directory | ||
- name: List Build Directory | ||
run: ls -R bin | ||
|
||
# Upload Build Artifact | ||
- name: Upload Build Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: gogg-windows-amd64 | ||
path: 'bin/gogg.exe' | ||
build: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.23 | ||
|
||
- name: Install Dependencies | ||
run: | | ||
choco install make -y | ||
make test | ||
continue-on-error: false | ||
|
||
- name: Build for Windows | ||
run: | | ||
make build GOGG_BINARY=gogg.exe | ||
continue-on-error: false | ||
|
||
- name: List Build Directory (for Debugging) | ||
run: ls -R bin | ||
|
||
- name: Upload Build Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: gogg-windows-amd64 | ||
path: 'bin/gogg.exe' |
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,28 +1,31 @@ | ||
name: Run Linters | ||
|
||
on: | ||
workflow_dispatch: # Allow manual execution | ||
push: | ||
tags: | ||
- 'v*' # Trigger on version tags | ||
workflow_dispatch: # Allow manual execution | ||
push: | ||
tags: | ||
- 'v*' # Trigger on version tags | ||
|
||
jobs: | ||
lint: | ||
runs-on: ubuntu-latest | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
steps: | ||
- name: Checkout Repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.23' | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: 1.23 | ||
|
||
- name: Install golangci-lint | ||
run: | | ||
make install-deps | ||
- name: Install Dependencies | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install -y make | ||
make install-deps | ||
- name: Run golangci-lint | ||
run: | | ||
make lint | ||
- name: Run Linters | ||
run: | | ||
make lint | ||
continue-on-error: false |
Oops, something went wrong.