From eb9ef8a1fd774c4db926294f38cc82b061ef9d50 Mon Sep 17 00:00:00 2001
From: tiaga <mp@amnezia.org>
Date: Tue, 13 Feb 2024 20:16:15 +0700
Subject: [PATCH] Improve pipeline

- rename `wg.exe` to `awg.exe`
- set release name automatically
---
 .github/workflows/linux-build.yml   | 1 +
 .github/workflows/windows-build.yml | 1 +
 build.cmd                           | 2 +-
 3 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/.github/workflows/linux-build.yml b/.github/workflows/linux-build.yml
index a8a0225..ff601b0 100644
--- a/.github/workflows/linux-build.yml
+++ b/.github/workflows/linux-build.yml
@@ -80,5 +80,6 @@ jobs:
           repo_token: ${{ secrets.GITHUB_TOKEN }}
           file: ./${{ matrix.os }}-${{ matrix.release }}-amneziawg-tools.zip
           tag: ${{ github.ref }}
+          release_name: ${{ github.ref_name }}
           overwrite: true
           file_glob: true
diff --git a/.github/workflows/windows-build.yml b/.github/workflows/windows-build.yml
index 3ae49f0..a2a7036 100644
--- a/.github/workflows/windows-build.yml
+++ b/.github/workflows/windows-build.yml
@@ -52,5 +52,6 @@ jobs:
           repo_token: ${{ secrets.GITHUB_TOKEN }}
           file: windows-amneziawg-tools.zip
           tag: ${{ github.ref }}
+          release_name: ${{ github.ref_name }}
           overwrite: true
           file_glob: true
diff --git a/build.cmd b/build.cmd
index 745dd69..683b4b5 100644
--- a/build.cmd
+++ b/build.cmd
@@ -46,7 +46,7 @@ if exist .deps/prepared goto :build
 	del src\*.exe src\*.o src\wincompat\*.o src\wincompat\*.lib 2> NUL
 	set LDFLAGS=-s
 	make --no-print-directory -C src PLATFORM=windows CC=%~2-w64-mingw32-gcc WINDRES=%~2-w64-mingw32-windres V=1 RUNSTATEDIR= SYSTEMDUNITDIR= -j%NUMBER_OF_PROCESSORS% || exit /b 1
-	move /Y src\wg.exe "%~1\wg.exe" > NUL || exit /b 1
+	move /Y src\wg.exe "%~1\awg.exe" > NUL || exit /b 1
 	goto :eof
 
 :error