Skip to content
This repository was archived by the owner on Jul 8, 2026. It is now read-only.

feat(upgrade): add beta channel support via script argument #8

feat(upgrade): add beta channel support via script argument

feat(upgrade): add beta channel support via script argument #8

Workflow file for this run

name: Build and Deploy Beta Pre-release
on:
push:
branches:
- 'beta'
workflow_dispatch:
jobs:
build-and-release-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: 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-amd64.zip"
zip -r "$zip_name" . \
-x ".git/*" ".github/*" "*.zip" ".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-arm64.zip"
zip -r "$zip_name" . \
-x ".git/*" ".github/*" "*.zip" ".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: Get latest commit message for release body
id: get_commit_message
run: echo "message=$(git log -1 --pretty=format:%s)" >> $GITHUB_OUTPUT
- name: Create Beta GitHub Release
uses: softprops/action-gh-release@v2
with:
tag_name: beta
name: "Beta Build"
body: "Latest beta build. Last commit: ${{ steps.get_commit_message.outputs.message }}"
files: |
${{ steps.package_amd64.outputs.zip_name }}
${{ steps.package_arm64.outputs.zip_name }}
prerelease: true
draft: false