summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmed AbdelHalim <[email protected]>2025-09-07 20:18:18 +0200
committerAhmed AbdelHalim <[email protected]>2025-09-07 21:31:39 +0200
commit91a4985eacc25178171d2813d88df3fdfa91e188 (patch)
treedddd3543a26d58a3f24c9685d91bb1464a96890c
parented937a30860839aedde56844f7c27fbbf31fbbdb (diff)
Add github release workflow
-rw-r--r--.build.yml4
-rw-r--r--.github/workflows/release.yml44
2 files changed, 46 insertions, 2 deletions
diff --git a/.build.yml b/.build.yml
index 60523a4..28cb358 100644
--- a/.build.yml
+++ b/.build.yml
@@ -22,6 +22,8 @@ tasks:
# This is for not having to cd into the <repo> for each task
echo 'cd wireguard-gateway-portal' >> ~/.buildenv
echo 'export "PATH=/home/build/go/bin:$PATH"' >> ~/.buildenv
+ - mirror: |
+ git push --force --mirror [email protected]:a14m/wireguard-gateway-portal.git
- deps: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/HEAD/install.sh | sh -s -- -b $(go env GOPATH)/bin
golangci-lint --version
@@ -34,5 +36,3 @@ tasks:
make lint
- build: |
make build
- - mirror: |
- git push --force --mirror [email protected]:a14m/wireguard-gateway-portal.git
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml
new file mode 100644
index 0000000..4eefd00
--- /dev/null
+++ b/.github/workflows/release.yml
@@ -0,0 +1,44 @@
+---
+name: "Build and Release"
+on:
+ push:
+ tags:
+ - v*
+permissions:
+ contents: write
+jobs:
+ build:
+ runs-on: ubuntu-latest
+ steps:
+ - name: Checkout code
+ uses: actions/checkout@v4
+ - name: Set up Go
+ uses: actions/setup-go@v5
+ with:
+ go-version: '1.25'
+ - name: Golangci-lint
+ uses: golangci/[email protected]
+ - name: Install dependencies
+ run: make deps
+ - name: Run lints
+ run: make lint
+ - name: Build binaries
+ run: make build
+ - name: Upload build artifacts
+ uses: actions/upload-artifact@v4
+ with:
+ name: wg-portal-binaries
+ path: dist/
+ - name: Create GitHub Release
+ uses: softprops/action-gh-release@v2
+ with:
+ files: |
+ dist/wg-portal-linux-amd64
+ dist/wg-portal-linux-arm64
+ dist/wg-portal-linux-arm
+ dist/checksums.txt
+ generate_release_notes: true
+ draft: false
+ prerelease: false
+ env:
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}