Use Ubuntu runner for Windows exe build
Some checks failed
build-windows-exe / build (push) Failing after 2m9s

This commit is contained in:
every_holiday
2026-06-24 00:50:07 +09:00
parent b189adebe5
commit ad81bc6985

View File

@@ -5,43 +5,41 @@ on:
jobs: jobs:
build: build:
runs-on: windows-latest runs-on: ubuntu-latest
steps: steps:
- name: Checkout - name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
- name: Install Go - name: Install Go
shell: pwsh shell: bash
run: | run: |
choco install golang --version=1.22.0 -y --no-progress sudo apt-get update
$env:PATH = "C:\Program Files\Go\bin;$env:PATH" sudo apt-get install -y golang-go
go version go version
- name: Test - name: Test
working-directory: VRWT_Tool/VRC_OSC working-directory: VRWT_Tool/VRC_OSC
shell: pwsh shell: bash
run: | run: |
$env:PATH = "C:\Program Files\Go\bin;$env:PATH"
go test ./... go test ./...
- name: Build executables - name: Build executables
working-directory: VRWT_Tool/VRC_OSC working-directory: VRWT_Tool/VRC_OSC
shell: pwsh shell: bash
run: | run: |
$env:PATH = "C:\Program Files\Go\bin;$env:PATH" mkdir -p dist
go build -o dist\vrc_osc.exe ./cmd/vrc_osc GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o dist/vrc_osc.exe ./cmd/vrc_osc
go build -o dist\vrwt_tool.exe ./cmd/vrwt_tool GOOS=windows GOARCH=amd64 CGO_ENABLED=0 go build -o dist/vrwt_tool.exe ./cmd/vrwt_tool
- name: Package executables - name: Package executables
working-directory: VRWT_Tool/VRC_OSC working-directory: VRWT_Tool/VRC_OSC
shell: pwsh shell: bash
run: | run: |
New-Item -ItemType Directory -Force -Path dist | Out-Null cp config/config.example.toml dist/config.example.toml
Copy-Item config\config.example.toml dist\config.example.toml cp config/secrets.example.toml dist/secrets.example.toml
Copy-Item config\secrets.example.toml dist\secrets.example.toml cp config/guests.example.txt dist/guests.example.txt
Copy-Item 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)
Compress-Archive -Path dist\vrc_osc.exe,dist\vrwt_tool.exe,dist\config.example.toml,dist\secrets.example.toml,dist\guests.example.txt -DestinationPath dist\vrc_osc-windows.zip -Force
- name: Upload artifact - name: Upload artifact
uses: actions/upload-artifact@v4 uses: actions/upload-artifact@v4