Skip to content

Fix powershell errors #7

Fix powershell errors

Fix powershell errors #7

Workflow file for this run

name: Build patched Go 1.24 for tests
on:
workflow_dispatch:
push:
branches:
- build
- release-branch.go1.24
paths:
- ".github/workflows/test-go1_24.yml"
- "**/*.go"
pull_request:
types: [opened, synchronize, reopened]
branches:
- build
- release-branch.go1.24
paths:
- ".github/workflows/test-go1_24.yml"
- "**/*.go"
jobs:
build:
runs-on: windows-latest
permissions:
contents: write
strategy:
matrix:
goos: [windows]
goarch: [amd64, 386]
buildtarget: ['release-branch.go1.24']
fail-fast: false
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
CGO_ENABLED: 0
steps:
- name: Show workflow information
run: |
$_NAME = "$GOOS-$GOARCH"
echo "GOOS: $GOOS, GOARCH: $GOARCH, APPLY-BRANCH: ${{ matrix.buildtarget }}"
echo "$ASSET_NAME = $_NAME" >> $GITHUB_ENV
- name: Set-up Go
uses: actions/setup-go@v5
with:
go-version: stable
check-latest: true
- name: Download source
uses: actions/checkout@v4
with:
repository: 'golang/go'
ref: ${{ matrix.buildtarget }}
# Patches for Go 1.24.x before more minor changes introduces.
- name: Apply patch
run: |
curl https://github.com/XTLS/go-win7/commit/f429f15f6305e4432afd7309b317e903bd76a5c0.diff | patch --verbose -p 1
curl https://github.com/XTLS/go-win7/commit/41f545de980e9285b68ece40d4b4e63feef9c5a1.diff | patch --verbose -p 1
curl https://github.com/XTLS/go-win7/commit/b6c99a977f732ee5553ddc75ae0fe3b47927fc1c.diff | patch --verbose -p 1
curl https://github.com/XTLS/go-win7/commit/36d7775e030192d3bf2dc111d1f6cfa89eae5f0c.diff | patch --verbose -p 1
curl https://github.com/XTLS/go-win7/commit/a3e4d4735a5d89f60b907308b556c5a53614914d.diff | patch --verbose -p 1
- name: Build patched Go
run: |
cd ./src
./all.bat
cd ..
- name: Upload package to Artifacts
uses: actions/upload-artifact@v4
with:
name: go-for-win7-${{ env.ASSET_NAME }}
path: |
./*