Skip to content

Commit 5978aaa

Browse files
committed
Add GitHub Actions workflows for Build, GoReleaser Check, and Release
1 parent ed59e6b commit 5978aaa

File tree

4 files changed

+126
-2
lines changed

4 files changed

+126
-2
lines changed

.github/workflows/build.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: Build and Test
2+
3+
on:
4+
push:
5+
branches: [ main ]
6+
pull_request:
7+
branches: [ main ]
8+
9+
jobs:
10+
test:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v4
15+
16+
- name: Set up Go
17+
uses: actions/setup-go@v5
18+
with:
19+
go-version: stable
20+
21+
# - name: Run tests
22+
# run: make test
23+
24+
- name: Build
25+
run: make build
26+
27+
snapshot:
28+
runs-on: ubuntu-latest
29+
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
30+
steps:
31+
- name: Checkout
32+
uses: actions/checkout@v4
33+
with:
34+
fetch-depth: 0
35+
36+
- name: Set up Go
37+
uses: actions/setup-go@v5
38+
with:
39+
go-version: stable
40+
41+
- name: Set up Docker Buildx
42+
uses: docker/setup-buildx-action@v3
43+
44+
- name: Run GoReleaser (Snapshot)
45+
uses: goreleaser/goreleaser-action@v5
46+
with:
47+
distribution: goreleaser
48+
version: latest
49+
args: release --snapshot --clean --skip=publish
50+
env:
51+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: GoReleaser Check
2+
3+
on:
4+
push:
5+
paths:
6+
- '.goreleaser.yml'
7+
- '.goreleaser.yaml'
8+
pull_request:
9+
paths:
10+
- '.goreleaser.yml'
11+
- '.goreleaser.yaml'
12+
13+
jobs:
14+
goreleaser-check:
15+
runs-on: ubuntu-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v4
19+
20+
- name: Set up Go
21+
uses: actions/setup-go@v5
22+
with:
23+
go-version: stable
24+
25+
- name: Check GoReleaser config
26+
uses: goreleaser/goreleaser-action@v5
27+
with:
28+
distribution: goreleaser
29+
version: latest
30+
args: check

.github/workflows/release.yml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- 'v*.*.*'
7+
8+
permissions:
9+
contents: write
10+
packages: write
11+
12+
jobs:
13+
goreleaser:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout
17+
uses: actions/checkout@v4
18+
with:
19+
fetch-depth: 0
20+
21+
- name: Set up Go
22+
uses: actions/setup-go@v5
23+
with:
24+
go-version: stable
25+
26+
- name: Set up Docker Buildx
27+
uses: docker/setup-buildx-action@v3
28+
29+
- name: Log in to GitHub Container Registry
30+
uses: docker/login-action@v3
31+
with:
32+
registry: ghcr.io
33+
username: ${{ github.actor }}
34+
password: ${{ secrets.GITHUB_TOKEN }}
35+
36+
- name: Run GoReleaser
37+
uses: goreleaser/goreleaser-action@v5
38+
with:
39+
distribution: goreleaser
40+
version: latest
41+
args: release --clean
42+
env:
43+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# gTunnel
1+
# GTunnel
22

3-
**gTunnel** is a fast, lightweight tunneling solution written in Go that allows you to expose local services to the internet through a secure tunnel. Similar to [ngrok](https://ngrok.com/) or [VSCode Port-Forwarding](https://code.visualstudio.com/docs/debugtest/port-forwarding), gTunnel provides a simple way to share your local development server with the world.
3+
**GTunnel** is a fast, lightweight tunneling solution written in Go that allows you to expose local services to the internet through a secure tunnel. Similar to [ngrok](https://ngrok.com/) or [VSCode Port-Forwarding](https://code.visualstudio.com/docs/debugtest/port-forwarding), GTunnel provides a simple way to share your local development server with the world.
44

55
![License](https://img.shields.io/github/license/B-AJ-Amar/gTunnel)
66
![Go Version](https://img.shields.io/github/go-mod/go-version/B-AJ-Amar/gTunnel)

0 commit comments

Comments
 (0)