name: Build backend file for windows inputs: go-version: required: false description: "The Go version to use for building the windows backend. The version should be in the format of 'x.y.z'." default: "1.26.2" mingw-version: required: false description: "The MinGW version to use for building the windows backend. The version should be in the format of 'x.y.z'." default: "15.2.0" mingw-revison: required: false description: "The MinGW revision to use for building the windows backend. The revision should be in the format of 'vX-revY'." default: "v13-rev1" release-build: required: false description: "Whether to build the windows backend in release mode. If set to '1', the backend will be built in release mode. Otherwise, it will be built in development mode." build-unix-time: required: false description: "The unix time to use for building the windows backend. The value should be a string representing the unix time in seconds." build-date: required: false description: "The date to use for building the windows backend. The value should be a string representing the date in the format of 'YYYYMMDD'." check-3rd-api: required: false description: "Whether to run integration tests that call third party APIs. If set to '1', the tests will be run. Otherwise, the tests will be skipped." skip-tests: required: false description: "Whether to skip tests when building the windows backend. If set to '1', the tests will be skipped. Otherwise, the tests will be run." backend-artifact-name-prefix: required: true description: "The prefix for the windows backend artifact name." runs: using: "composite" steps: - name: Set up Go uses: actions/setup-go@v6 with: go-version: ${{ inputs.go-version }} - name: Install MinGW shell: pwsh run: | $mingwVersion = "${{ inputs.mingw-version }}" $mingwRevision = "${{ inputs.mingw-revison }}" $url = "https://github.com/niXman/mingw-builds-binaries/releases/download/${mingwVersion}-rt_${mingwRevision}/x86_64-${mingwVersion}-release-posix-seh-ucrt-rt_${mingwRevision}.7z" $archive = "C:\mingw.7z" $mingwDir = "C:\mingw64" Write-Host "Downloading MinGW from ${url}" Invoke-WebRequest -Uri ${url} -OutFile ${archive} Remove-Item -Recurse -Force ${mingwDir} New-Item -ItemType Directory -Path ${mingwDir} Write-Host "Extracting MinGW to ${mingwDir}" 7z x ${archive} -oC:\ "${mingwDir}\bin" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8 -Append - name: Build backend for windows-x64 shell: pwsh env: RELEASE_BUILD: "${{ inputs.release-build }}" BUILD_PIPELINE: "1" BUILD_UNIXTIME: "${{ inputs.build-unix-time }}" BUILD_DATE: "${{ inputs.build-date }}" CHECK_3RD_API: "${{ inputs.check-3rd-api }}" SKIP_TESTS: "${{ inputs.skip-tests }}" run: | .\build.ps1 backend - name: Upload windows backend artifact uses: actions/upload-artifact@v7 with: name: ${{ inputs.backend-artifact-name-prefix }}-windows-x64 path: ezbookkeeping.exe if-no-files-found: error