Skip to content

Patched Go 1.26.3 for Windows Server 2008 R2, Windows 7, Windows Server 2012, Windows Server 2012 R2 and Windows 8.1 #93

Patched Go 1.26.3 for Windows Server 2008 R2, Windows 7, Windows Server 2012, Windows Server 2012 R2 and Windows 8.1

Patched Go 1.26.3 for Windows Server 2008 R2, Windows 7, Windows Server 2012, Windows Server 2012 R2 and Windows 8.1 #93

Workflow file for this run

name: Build patched Go and release
on:
workflow_dispatch:
release:
types: [published]
push:
branches:
- build
paths:
- ".github/workflows/release.yml"
pull_request:
types: [opened, synchronize, reopened]
paths:
- ".github/workflows/release.yml"
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
matrix:
goos: [windows, linux, darwin]
goarch: [amd64, arm64]
buildtarget: ['go1.26.3']
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, GOVER: ${{ matrix.buildtarget }}"
echo "ASSET_NAME=$_NAME" >> $GITHUB_ENV
- name: Download source
uses: actions/checkout@v6
with:
repository: 'golang/go'
ref: ${{ matrix.buildtarget }}
# Patches for Go 1.26.x before more minor changes introduces.
- name: Apply patch
run: |
curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://github.com/XTLS/go-win7/raw/refs/heads/build/unified-1-26-patch.diff | patch --verbose -p 1
- name: Set-up Go
uses: actions/setup-go@v6
with:
go-version-file: 'src/go.mod'
check-latest: true
- name: Build patched Go
shell: bash
run: |
cd ./src
. ./make.bash "$@" --no-banner
../bin/go tool dist banner
cd ..
- name: Copy binaries into bin
if: matrix.goos != 'linux' || matrix.goarch != 'amd64'
shell: bash
run: |
cd ./bin
DIR="${GOOS}_${GOARCH}"
if [ -d "${DIR}" ]; then
echo "Found ${DIR} copying binaries"
rm ./go*
for BINARY in "${DIR}"/*
do
echo "mv ./${BINARY} ./"
mv ./${BINARY} ./
done
rm -r ./"${DIR}"
rm -r ../pkg/tool/linux_amd64/
fi
cd ..
ls -al ./bin
- name: Copy License
run: |
rm ./LICENSE
curl -O https://raw.githubusercontent.com/XTLS/go-win7/refs/heads/build/LICENSE
- name: Upload package to Artifacts
uses: actions/upload-artifact@v7
with:
name: go-for-win7-${{ env.ASSET_NAME }}
path: |
./*
- name: create ZIP archive
if: github.event_name == 'release'
shell: bash
run: |
zip -9vr ./go-for-win7-${{ env.ASSET_NAME }}.zip . -x "./.*" "./.*/*" "./**/.*" "./**/.*/*" "./**/*_test.go" "./**/testdata"
- name: Compute hashes for file
if: github.event_name == 'release'
run: |
FILE=./go-for-win7-${{ env.ASSET_NAME }}.zip
DGST=$FILE.dgst
for METHOD in {"md5","sha1","sha256","sha512"}
do
openssl dgst -$METHOD $FILE | sed 's/([^)]*)//g' >>$DGST
done
- name: Upload packages to release
uses: svenstaro/upload-release-action@v2
if: github.event_name == 'release'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./go-for-win7-${{ env.ASSET_NAME }}.zip*
tag: ${{ github.ref }}
file_glob: true
pre-cr:
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
matrix:
buildtarget: ['go1.26.3']
fail-fast: false
steps:
- name: Download source
uses: actions/checkout@v6
with:
repository: 'golang/go'
ref: ${{ matrix.buildtarget }}
- name: Apply patch
run: |
curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://github.com/XTLS/go-win7/raw/refs/heads/build/unified-1-26-patch.diff | patch --verbose -p 1
curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://github.com/XTLS/go-win7/raw/refs/heads/build/pre-KB3125574-1-26.diff | patch --verbose -p 1
- name: Copy License
run: |
rm ./LICENSE
curl -O https://raw.githubusercontent.com/XTLS/go-win7/refs/heads/build/LICENSE
- name: Upload package to Artifacts
uses: actions/upload-artifact@v7
with:
name: source-pre-KB3125574
path: |
./*
- name: create ZIP archive
if: github.event_name == 'release'
shell: bash
run: |
zip -9vr ./source-pre-KB3125574.zip . -x "./.*" "./.*/*" "./**/.*" "./**/.*/*" "./**/*_test.go"
- name: Compute hashes for file
if: github.event_name == 'release'
run: |
FILE=./source-pre-KB3125574.zip
DGST=$FILE.dgst
for METHOD in {"md5","sha1","sha256","sha512"}
do
openssl dgst -$METHOD $FILE | sed 's/([^)]*)//g' >>$DGST
done
- name: Upload packages to release
uses: svenstaro/upload-release-action@v2
if: github.event_name == 'release'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./source-pre-KB3125574.zip*
tag: ${{ github.ref }}
file_glob: true
pre-ws:
runs-on: ubuntu-latest
permissions:
contents: write
strategy:
matrix:
buildtarget: ['go1.26.3']
fail-fast: false
steps:
- name: Download source
uses: actions/checkout@v6
with:
repository: 'golang/go'
ref: ${{ matrix.buildtarget }}
- name: Apply patch
run: |
curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://github.com/XTLS/go-win7/raw/refs/heads/build/unified-1-26-patch.diff | patch --verbose -p 1
curl -L -H "Authorization: Bearer ${{ secrets.GITHUB_TOKEN }}" https://github.com/XTLS/go-win7/raw/refs/heads/build/pre-SP1-1-26.diff | patch --verbose -p 1
- name: Copy License
run: |
rm ./LICENSE
curl -O https://raw.githubusercontent.com/XTLS/go-win7/refs/heads/build/LICENSE
- name: Upload package to Artifacts
uses: actions/upload-artifact@v7
with:
name: source-pre-SP1
path: |
./*
- name: create ZIP archive
if: github.event_name == 'release'
shell: bash
run: |
zip -9vr ./source-pre-SP1.zip . -x "./.*" "./.*/*" "./**/.*" "./**/.*/*" "./**/*_test.go"
- name: Compute hashes for file
if: github.event_name == 'release'
run: |
FILE=./source-pre-SP1.zip
DGST=$FILE.dgst
for METHOD in {"md5","sha1","sha256","sha512"}
do
openssl dgst -$METHOD $FILE | sed 's/([^)]*)//g' >>$DGST
done
- name: Upload packages to release
uses: svenstaro/upload-release-action@v2
if: github.event_name == 'release'
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: ./source-pre-SP1.zip*
tag: ${{ github.ref }}
file_glob: true