From 431e6d2288ef99f8e20dd54bc26023a5aaee8847 Mon Sep 17 00:00:00 2001 From: Whispering Wind <151555003+ReturnFI@users.noreply.github.com> Date: Mon, 15 Sep 2025 07:12:01 +0330 Subject: [PATCH] feat(ci): add beta build workflow for testing --- .github/workflows/build-beta.yml | 76 ++++++++++++++++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 .github/workflows/build-beta.yml diff --git a/.github/workflows/build-beta.yml b/.github/workflows/build-beta.yml new file mode 100644 index 0000000..6960671 --- /dev/null +++ b/.github/workflows/build-beta.yml @@ -0,0 +1,76 @@ +name: Build Beta Version + +on: + push: + branches: + - 'beta' + workflow_dispatch: + +jobs: + build-and-package-beta: + 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.22.x' + cache-dependency-path: core/scripts/auth/go.sum + + - name: Generate beta version string + id: get_version + run: echo "version=beta-$(date +'%Y%m%d')-$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT + + - name: Initialize Go module + working-directory: ./core/scripts/auth + run: | + go mod init hysteria_auth + go mod tidy + + - name: Build and Package for linux-amd64 + id: package_amd64 + run: | + (cd core/scripts/auth && GOOS=linux GOARCH=amd64 go build -o user_auth .) + zip_name="Blitz-${{ steps.get_version.outputs.version }}-amd64.zip" + zip -r "$zip_name" . \ + -x ".git/*" \ + ".github/*" \ + ".gitignore" \ + "CONTRIBUTING.md" \ + "LICENSE" \ + "README*.md" \ + "SECURITY.md" \ + "changelog" \ + "core/scripts/auth/go.*" \ + "core/scripts/auth/user_auth.go" + rm core/scripts/auth/user_auth + echo "zip_name=$zip_name" >> $GITHUB_OUTPUT + + - name: Build and Package for linux-arm64 + id: package_arm64 + run: | + (cd core/scripts/auth && GOOS=linux GOARCH=arm64 go build -o user_auth .) + zip_name="Blitz-${{ steps.get_version.outputs.version }}-arm64.zip" + zip -r "$zip_name" . \ + -x ".git/*" \ + ".github/*" \ + ".gitignore" \ + "CONTRIBUTING.md" \ + "LICENSE" \ + "README*.md" \ + "SECURITY.md" \ + "changelog" \ + "core/scripts/auth/go.*" \ + "core/scripts/auth/user_auth.go" + rm core/scripts/auth/user_auth + echo "zip_name=$zip_name" >> $GITHUB_OUTPUT + + - name: Upload Beta Artifacts + uses: actions/upload-artifact@v4 + with: + name: Blitz-Beta-Builds + path: | + ${{ steps.package_amd64.outputs.zip_name }} + ${{ steps.package_arm64.outputs.zip_name }}