feat: add build and publish automation script for component deployment
Build and Release / release (push) Successful in 1m53s
Build and Release / release (push) Successful in 1m53s
This commit is contained in:
+16
-20
@@ -17,30 +17,26 @@ jobs:
|
||||
- name: Download Go dependencies
|
||||
run: go mod download
|
||||
|
||||
- name: Build for Windows
|
||||
run: GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" .
|
||||
- name: Build for Windows x64
|
||||
run: GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o firefly-go-proxy-windows-amd64.exe .
|
||||
|
||||
- name: Build for macOS Intel
|
||||
run: |
|
||||
GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 \
|
||||
go build -trimpath -ldflags="-s -w" \
|
||||
-o firefly-go-proxy-macos-amd64 .
|
||||
- name: Build for Windows ARM64
|
||||
run: GOOS=windows GOARCH=arm64 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o firefly-go-proxy-windows-arm64.exe .
|
||||
|
||||
- name: Build for macOS Apple Silicon
|
||||
run: |
|
||||
GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 \
|
||||
go build -trimpath -ldflags="-s -w" \
|
||||
-o firefly-go-proxy-macos-arm64 .
|
||||
- name: Build for macOS x64
|
||||
run: GOOS=darwin GOARCH=amd64 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o firefly-go-proxy-macos-amd64 .
|
||||
|
||||
- name: Build for macOS ARM64
|
||||
run: GOOS=darwin GOARCH=arm64 CGO_ENABLED=0 go build -trimpath -ldflags="-s -w" -o firefly-go-proxy-macos-arm64 .
|
||||
|
||||
- name: Grant execute permissions
|
||||
run: |
|
||||
chmod +x ./script/release-uploader
|
||||
chmod +x ./script/publish/publish-script
|
||||
|
||||
- name: Upload release
|
||||
- name: Publish components to API
|
||||
run: ./script/publish/publish-script
|
||||
env:
|
||||
REPO_TOKEN: ${{ secrets.REPO_TOKEN }}
|
||||
run: |
|
||||
script/release-uploader \
|
||||
-token="$REPO_TOKEN" \
|
||||
-release-url="https://git.kain.io.vn/api/v1/repos/Firefly-Shelter/FireflyGo_Proxy/releases" \
|
||||
-files="firefly-go-proxy.exe,firefly-go-proxy-macos-amd64,firefly-go-proxy-macos-arm64"
|
||||
ENV_ROBOT_TOKEN: ${{ secrets.ENV_ROBOT_TOKEN }}
|
||||
ENV_GAME_IDS: ${{ secrets.ENV_GAME_IDS }}
|
||||
ENV_COMPONENT_TYPE: PROXY
|
||||
ENV_FILES: "firefly-go-proxy-windows-amd64.exe,firefly-go-proxy-windows-arm64.exe,firefly-go-proxy-macos-amd64,firefly-go-proxy-macos-arm64"
|
||||
|
||||
Reference in New Issue
Block a user