mirror of
https://github.com/uNetworking/uWebSockets.js.git
synced 2026-03-28 05:01:24 -04:00
Remove split-binaries job from build.yml
Removed the split-binaries job from the build workflow.
This commit is contained in:
48
.github/workflows/build.yml
vendored
48
.github/workflows/build.yml
vendored
@@ -40,51 +40,3 @@ jobs:
|
||||
git config --global user.name "Alex Hultman"
|
||||
git commit -a -m "[GitHub Actions] Updated ${{ matrix.os }} binaries" || true
|
||||
git push "https://unetworkingab:${{ secrets.SECRET }}@github.com/uNetworking/uWebSockets.js" binaries
|
||||
|
||||
split-binaries:
|
||||
needs: build
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout binaries branch
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
ref: binaries
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Split and Push to Platform Branches
|
||||
run: |
|
||||
git config --global user.email "alexhultman@gmail.com"
|
||||
git config --global user.name "Alex Hultman"
|
||||
|
||||
PLATFORMS=("win32_x64" "linux_x64" "linux_arm64" "darwin_x64" "darwin_arm64")
|
||||
|
||||
for PLATFORM in "${PLATFORMS[@]}"; do
|
||||
BRANCH="${PLATFORM}_binaries"
|
||||
echo "Updating $BRANCH..."
|
||||
|
||||
# 1. Fetch existing branch OR create a CLEAN orphan
|
||||
if git fetch origin $BRANCH; then
|
||||
git checkout $BRANCH
|
||||
git reset --hard origin/$BRANCH
|
||||
else
|
||||
git checkout --orphan $BRANCH
|
||||
git rm -rf . # CRITICAL: Remove leftovers from the 'binaries' branch
|
||||
fi
|
||||
|
||||
# 2. Sync files for this platform
|
||||
git checkout binaries -- "*${PLATFORM}*" "source_commit"
|
||||
|
||||
# 3. Read the SHA for the commit message
|
||||
SOURCE_SHA=$(cat source_commit | tr -d '\n\r')
|
||||
|
||||
# 4. Commit and push
|
||||
git add .
|
||||
if git commit -m "[GitHub Actions] $PLATFORM binaries for $SOURCE_SHA"; then
|
||||
git push "https://unetworkingab:${{ secrets.SECRET }}@github.com/uNetworking/uWebSockets.js" $BRANCH
|
||||
else
|
||||
echo "No changes for $PLATFORM, skipping push."
|
||||
fi
|
||||
|
||||
# 5. Force jump back to binaries branch to clean the workspace for the next loop
|
||||
git checkout -f binaries
|
||||
done
|
||||
|
||||
Reference in New Issue
Block a user