generated from habedi/template-go-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Updated the GitHub Actions files to include release steps - Added a contribution guide
- Loading branch information
Showing
12 changed files
with
211 additions
and
34 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
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 |
---|---|---|
@@ -0,0 +1,137 @@ | ||
name: Build and Release | ||
|
||
on: | ||
workflow_dispatch: # Allow manual execution | ||
push: | ||
tags: | ||
- 'v*' # Trigger on version tags | ||
|
||
jobs: | ||
build-windows: | ||
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 format | ||
make test | ||
- name: Build Windows Binary | ||
run: | | ||
make build GOGG_BINARY=gogg.exe | ||
- name: Upload Windows Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: gogg-windows | ||
path: bin/gogg.exe | ||
|
||
build-linux: | ||
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 format | ||
make test | ||
- name: Build Linux Binary | ||
run: | | ||
make build | ||
- name: Upload Linux Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: gogg-linux | ||
path: bin/gogg | ||
|
||
build-macos: | ||
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 format | ||
make test | ||
- name: Build macOS Binary | ||
run: | | ||
make build-macos | ||
- name: Upload macOS Artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: gogg-macos | ||
path: bin/gogg | ||
|
||
release: | ||
runs-on: ubuntu-latest | ||
needs: [ build-windows, build-linux, build-macos ] | ||
steps: | ||
- name: Download Windows Artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: gogg-windows | ||
path: ./windows | ||
|
||
- name: Download Linux Artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: gogg-linux | ||
path: ./linux | ||
|
||
- name: Download macOS Artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: gogg-macos | ||
path: ./macos | ||
|
||
- name: List Downloaded Files (for debugging) | ||
run: ls -R . | ||
|
||
- name: Rename Extracted Binaries | ||
run: | | ||
cd windows && zip -r9 ../gogg-windows-amd64.zip gogg.exe && cd .. | ||
cd linux && zip -r9 ../gogg-linux-amd64.zip gogg && cd .. | ||
cd macos && zip -r9 ../gogg-macos-universal.zip gogg && cd .. | ||
- name: Create GitHub Release | ||
uses: ncipollo/release-action@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
name: ${{ github.ref_name }} | ||
tag: ${{ github.ref_name }} | ||
body: | | ||
Release version ${{ github.ref_name }} | ||
- Binary builds for Windows, Linux, and macOS | ||
artifacts: | | ||
gogg-windows-amd64.zip | ||
gogg-linux-amd64.zip | ||
gogg-macos-universal.zip | ||
draft: false | ||
prerelease: false |
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,33 @@ | ||
# Contributing to Gogg | ||
|
||
Thank you for considering contributing to Gogg. | ||
Contributions are always welcome and appreciated. | ||
|
||
## How to Contribute | ||
|
||
### Reporting Bugs | ||
|
||
1. Open an issue on the [issue tracker](https://github.com/habedi/gogg/issues). | ||
2. Include information like steps to reproduce, expected/actual behaviour, and relevant logs or screenshots. | ||
|
||
### Suggesting Features | ||
|
||
1. Open an issue on the [issue tracker](https://github.com/habedi/gogg/issues). | ||
2. Write a little about the feature, its purpose, and potential implementation ideas. | ||
|
||
## Submitting Pull Requests | ||
|
||
- Make sure all tests pass before submitting a pull request. | ||
- Write a clear description of the changes you made and why you made them for the pull request. | ||
|
||
## Code Style | ||
|
||
- Use the `make format` command to format the code. | ||
|
||
## Running Tests | ||
|
||
- Use the `make test` command to run the unit tests. | ||
|
||
## Miscellaneous | ||
|
||
- Run `make help` to see all available commands to manage different tasks. |
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
Empty file.
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
File renamed without changes
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