Skip to content

Commit 767e656

Browse files
committed
First release
- Updated the GitHub Actions files to include release steps - Added a contribution guide
1 parent 8392c79 commit 767e656

File tree

12 files changed

+211
-34
lines changed

12 files changed

+211
-34
lines changed

.github/workflows/build_linux.yml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Linux Build
22

33
on:
4-
workflow_dispatch: # Only enable manual runs for now
4+
workflow_dispatch: # Enable manual execution
55

66
jobs:
77
build:
@@ -36,11 +36,9 @@ jobs:
3636
- name: List Build Directory
3737
run: ls -R bin
3838

39-
# Archive the build artifacts
40-
- name: Archive Build Artifacts
39+
# Upload Build Artifact
40+
- name: Upload Build Artifact
4141
uses: actions/upload-artifact@v4
4242
with:
4343
name: gogg-linux-amd64
4444
path: 'bin/gogg'
45-
46-
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: MacOS Build
22

33
on:
4-
workflow_dispatch: # Only enable manual runs for now
4+
workflow_dispatch: # Enable manual execution
55

66
jobs:
77
build:
@@ -30,17 +30,15 @@ jobs:
3030
- name: Build for MacOS
3131
run: |
3232
make build-macos
33-
3433
continue-on-error: false
3534

3635
# Debug: List Build Directory
3736
- name: List Build Directory
3837
run: ls -R bin
3938

40-
# Archive the build artifacts
41-
- name: Archive Build Artifacts
39+
# Upload Build Artifact
40+
- name: Upload Build Artifact
4241
uses: actions/upload-artifact@v4
4342
with:
4443
name: gogg-macos-universal
4544
path: 'bin/gogg'
46-
Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Windows Build
22

33
on:
4-
workflow_dispatch: # Only enable manual runs for now
4+
workflow_dispatch: # Enable manual execution
55

66
jobs:
77
build:
@@ -36,11 +36,9 @@ jobs:
3636
- name: List Build Directory
3737
run: ls -R bin
3838

39-
# Archive the build artifacts
40-
- name: Archive Build Artifacts
39+
# Upload Build Artifact
40+
- name: Upload Build Artifact
4141
uses: actions/upload-artifact@v4
4242
with:
4343
name: gogg-windows-amd64
4444
path: 'bin/gogg.exe'
45-
46-

.github/workflows/release.yml

Lines changed: 137 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,137 @@
1+
name: Build and Release
2+
3+
on:
4+
workflow_dispatch: # Allow manual execution
5+
push:
6+
tags:
7+
- 'v*' # Trigger on version tags
8+
9+
jobs:
10+
build-windows:
11+
runs-on: windows-latest
12+
steps:
13+
- name: Checkout Repository
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@v5
18+
with:
19+
go-version: 1.23
20+
21+
- name: Install Dependencies
22+
run: |
23+
choco install make -y
24+
make format
25+
make test
26+
27+
- name: Build Windows Binary
28+
run: |
29+
make build GOGG_BINARY=gogg.exe
30+
31+
- name: Upload Windows Artifact
32+
uses: actions/upload-artifact@v4
33+
with:
34+
name: gogg-windows
35+
path: bin/gogg.exe
36+
37+
build-linux:
38+
runs-on: ubuntu-latest
39+
steps:
40+
- name: Checkout Repository
41+
uses: actions/checkout@v4
42+
43+
- name: Set up Go
44+
uses: actions/setup-go@v5
45+
with:
46+
go-version: 1.23
47+
48+
- name: Install Dependencies
49+
run: |
50+
sudo apt-get update
51+
sudo apt-get install -y make
52+
make format
53+
make test
54+
55+
- name: Build Linux Binary
56+
run: |
57+
make build
58+
59+
- name: Upload Linux Artifact
60+
uses: actions/upload-artifact@v4
61+
with:
62+
name: gogg-linux
63+
path: bin/gogg
64+
65+
build-macos:
66+
runs-on: macos-latest
67+
steps:
68+
- name: Checkout Repository
69+
uses: actions/checkout@v4
70+
71+
- name: Set up Go
72+
uses: actions/setup-go@v5
73+
with:
74+
go-version: 1.23
75+
76+
- name: Install Dependencies
77+
run: |
78+
brew install make
79+
make format
80+
make test
81+
82+
- name: Build macOS Binary
83+
run: |
84+
make build-macos
85+
86+
- name: Upload macOS Artifact
87+
uses: actions/upload-artifact@v4
88+
with:
89+
name: gogg-macos
90+
path: bin/gogg
91+
92+
release:
93+
runs-on: ubuntu-latest
94+
needs: [ build-windows, build-linux, build-macos ]
95+
steps:
96+
- name: Download Windows Artifact
97+
uses: actions/download-artifact@v4
98+
with:
99+
name: gogg-windows
100+
path: ./windows
101+
102+
- name: Download Linux Artifact
103+
uses: actions/download-artifact@v4
104+
with:
105+
name: gogg-linux
106+
path: ./linux
107+
108+
- name: Download macOS Artifact
109+
uses: actions/download-artifact@v4
110+
with:
111+
name: gogg-macos
112+
path: ./macos
113+
114+
- name: List Downloaded Files (for debugging)
115+
run: ls -R .
116+
117+
- name: Rename Extracted Binaries
118+
run: |
119+
cd windows && zip -r9 ../gogg-windows-amd64.zip gogg.exe && cd ..
120+
cd linux && zip -r9 ../gogg-linux-amd64.zip gogg && cd ..
121+
cd macos && zip -r9 ../gogg-macos-universal.zip gogg && cd ..
122+
123+
- name: Create GitHub Release
124+
uses: ncipollo/release-action@v1
125+
with:
126+
token: ${{ secrets.GITHUB_TOKEN }}
127+
name: ${{ github.ref_name }}
128+
tag: ${{ github.ref_name }}
129+
body: |
130+
Release version ${{ github.ref_name }}
131+
- Binary builds for Windows, Linux, and macOS
132+
artifacts: |
133+
gogg-windows-amd64.zip
134+
gogg-linux-amd64.zip
135+
gogg-macos-universal.zip
136+
draft: false
137+
prerelease: false

CONTRIBUTING.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Contributing to Gogg
2+
3+
Thank you for considering contributing to Gogg.
4+
Contributions are always welcome and appreciated.
5+
6+
## How to Contribute
7+
8+
### Reporting Bugs
9+
10+
1. Open an issue on the [issue tracker](https://github.com/habedi/gogg/issues).
11+
2. Include information like steps to reproduce, expected/actual behaviour, and relevant logs or screenshots.
12+
13+
### Suggesting Features
14+
15+
1. Open an issue on the [issue tracker](https://github.com/habedi/gogg/issues).
16+
2. Write a little about the feature, its purpose, and potential implementation ideas.
17+
18+
## Submitting Pull Requests
19+
20+
- Make sure all tests pass before submitting a pull request.
21+
- Write a clear description of the changes you made and why you made them for the pull request.
22+
23+
## Code Style
24+
25+
- Use the `make format` command to format the code.
26+
27+
## Running Tests
28+
29+
- Use the `make test` command to run the unit tests.
30+
31+
## Miscellaneous
32+
33+
- Run `make help` to see all available commands to manage different tasks.

Makefile

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ help:
2424
@echo " snap-deps Install Snapcraft dependencies"
2525
@echo " snap Build the Snap package"
2626
@echo " install-deps Install development dependencies on Debian-based systems"
27+
@echo " lint Lint Go files to check for potential errors"
2728
@echo " help Show this help message"
2829

2930
# Building the project
@@ -75,6 +76,7 @@ snap-deps:
7576
@echo "Installing Snapcraft dependencies..."
7677
sudo apt-get update
7778
sudo apt-get install -y snapd
79+
sudo snap refresh
7880
sudo snap install snapcraft --classic
7981
sudo snap install multipass --classic
8082

@@ -86,7 +88,13 @@ snap: build # snap-deps
8688
# Install Dependencies on Debian-based systems like Ubuntu
8789
install-deps:
8890
@echo "Installing dependencies..."
89-
sudo apt-get update
90-
sudo apt-get install -y chromium-browser snapd build-essential
91-
sudo snap refresh
92-
sudo snap install snapcraft multipass chromium go
91+
make snap-deps
92+
sudo apt-get install -y chromium-browser build-essential
93+
sudo snap install chromium
94+
sudo snap install go --classic
95+
sudo snap install golangci-lint --classic
96+
97+
# Linting Go files
98+
lint:
99+
@echo "Linting Go files..."
100+
golangci-lint run ./...

README.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<div align="center">
22
<picture>
3-
<source media="(prefers-color-scheme: light)" srcset="assets/logo-v1.jpeg">
4-
<source media="(prefers-color-scheme: dark)" srcset="assets/logo-v1.jpeg">
5-
<img alt="Gogg logo" src="assets/logo-v1.jpeg" height="35%" width="35%">
3+
<source media="(prefers-color-scheme: light)" srcset="logo.jpeg">
4+
<source media="(prefers-color-scheme: dark)" srcset="logo.jpeg">
5+
<img alt="Gogg logo" src="logo.jpeg" height="40%" width="40%">
66
</picture>
77
</div>
88
<br>
@@ -20,10 +20,16 @@
2020
<a href="https://github.com/habedi/gogg/releases/latest">
2121
<img src="https://img.shields.io/github/release/habedi/gogg.svg?style=flat-square" alt="Release">
2222
</a>
23-
<a href="https://snapcraft.io/gogg">
24-
<img src="https://snapcraft.io/gogg/badge.svg" alt="Snap Store">
23+
<br>
24+
<a href="https://github.com/habedi/gogg/actions/workflows/build_linux.yml">
25+
<img src="https://github.com/habedi/gogg/actions/workflows/build_linux.yml/badge.svg" alt="Linux Build">
26+
</a>
27+
<a href="https://github.com/habedi/gogg/actions/workflows/build_windows.yml">
28+
<img src="https://github.com/habedi/gogg/actions/workflows/build_windows.yml/badge.svg" alt="Windows Build">
29+
</a>
30+
<a href="https://github.com/habedi/gogg/actions/workflows/build_macos.yml">
31+
<img src="https://github.com/habedi/gogg/actions/workflows/build_macos.yml/badge.svg" alt="MacOS Build">
2532
</a>
26-
2733
</p>
2834

2935
# Gogg
@@ -56,6 +62,8 @@ Additionally, it allows users to perform the following actions:
5662

5763
See the [documentation](docs/README.md) for how to install and use Gogg.
5864

65+
Run `gogg -h` to see the available commands and options.
66+
5967
### Examples
6068

6169
For more detailed examples, see the content of the [examples](docs/examples/) directory.
@@ -76,8 +84,8 @@ gogg auth
7684
```
7785

7886
> You must have [Google Chrome](https://www.google.com/chrome/) or [Chromium](https://www.chromium.org/) installed
79-
on your machine for the first-time authentication.
80-
So, make sure you have one of them installed.
87+
> on your machine for the first-time authentication.
88+
> So, make sure you have one of them installed.
8189
8290
#### Syncing the Game Catalogue
8391

@@ -93,6 +101,6 @@ gogg catalogue refresh
93101
gogg download --id 1207658924 --dir ./games --platform windows --lang en --dlcs true --extras true --resume true --threads 5
94102
```
95103

96-
## Bugs and Features
104+
## Contributing
97105

98-
Use the [issue tracker](github.com/habedi/gogg/issues) to report a bug or ask for a feature.
106+
Please see the [CONTRIBUTING.md](CONTRIBUTING.md) file for information on how to contribute to Gogg.

assets/workflow.dot

Whitespace-only changes.

cmd/version.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66

77
var (
88
// Gogg version
9-
version = "0.2.0"
9+
version = "0.2.1"
1010
)
1111

1212
// versionCmd shows the version of Gogg

docs/README.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,8 @@
1010

1111
You can download the binary builds of Gogg for your operating system
1212
from the [releases page](https://github.com/habedi/gogg/releases).
13-
1413
You might want to add the binary to your system's PATH to use it from anywhere on your system.
1514

16-
Run `gogg -h` to see the available commands and options.
17-
1815
## Usage
1916

2017
### First Time Setup

0 commit comments

Comments
 (0)