51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
name: build-windows-exe
|
|
|
|
on:
|
|
push:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout
|
|
shell: bash
|
|
run: |
|
|
git clone --depth 1 "$GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git" .
|
|
|
|
- name: Install Go
|
|
shell: bash
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y golang-go
|
|
go version
|
|
|
|
- name: Test
|
|
working-directory: VRWT_Tool/VRC_OSC
|
|
shell: bash
|
|
run: |
|
|
go test ./...
|
|
|
|
- name: Build executables
|
|
working-directory: VRWT_Tool/VRC_OSC
|
|
shell: bash
|
|
run: |
|
|
mkdir -p dist
|
|
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o dist/vrc_osc.exe ./cmd/vrc_osc
|
|
GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o dist/vrwt_tool.exe ./cmd/vrwt_tool
|
|
|
|
- name: Package executables
|
|
working-directory: VRWT_Tool/VRC_OSC
|
|
shell: bash
|
|
run: |
|
|
cp config/config.example.toml dist/config.example.toml
|
|
cp config/secrets.example.toml dist/secrets.example.toml
|
|
cp config/guests.example.txt dist/guests.example.txt
|
|
(cd dist && zip -r vrc_osc-windows.zip vrc_osc.exe vrwt_tool.exe config.example.toml secrets.example.toml guests.example.txt)
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: vrc_osc-windows
|
|
path: VRWT_Tool/VRC_OSC/dist/vrc_osc-windows.zip
|