Use Ubuntu runner for Windows exe build
Some checks failed
build-windows-exe / build (push) Failing after 2m9s
Some checks failed
build-windows-exe / build (push) Failing after 2m9s
This commit is contained in:
@@ -5,43 +5,41 @@ on:
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: windows-latest
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Install Go
|
||||
shell: pwsh
|
||||
shell: bash
|
||||
run: |
|
||||
choco install golang --version=1.22.0 -y --no-progress
|
||||
$env:PATH = "C:\Program Files\Go\bin;$env:PATH"
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y golang-go
|
||||
go version
|
||||
|
||||
- name: Test
|
||||
working-directory: VRWT_Tool/VRC_OSC
|
||||
shell: pwsh
|
||||
shell: bash
|
||||
run: |
|
||||
$env:PATH = "C:\Program Files\Go\bin;$env:PATH"
|
||||
go test ./...
|
||||
|
||||
- name: Build executables
|
||||
working-directory: VRWT_Tool/VRC_OSC
|
||||
shell: pwsh
|
||||
shell: bash
|
||||
run: |
|
||||
$env:PATH = "C:\Program Files\Go\bin;$env:PATH"
|
||||
go build -o dist\vrc_osc.exe ./cmd/vrc_osc
|
||||
go build -o dist\vrwt_tool.exe ./cmd/vrwt_tool
|
||||
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: pwsh
|
||||
shell: bash
|
||||
run: |
|
||||
New-Item -ItemType Directory -Force -Path dist | Out-Null
|
||||
Copy-Item config\config.example.toml dist\config.example.toml
|
||||
Copy-Item config\secrets.example.toml dist\secrets.example.toml
|
||||
Copy-Item config\guests.example.txt dist\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
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user