Skip to content

chore: version to 0.39.4 (#2761) #27

chore: version to 0.39.4 (#2761)

chore: version to 0.39.4 (#2761) #27

Workflow file for this run

name: Update Trampoline Binary
on:
push:
paths:
- "trampoline/**"
- ".github/workflows/trampoline.yaml"
- "src/global/trampoline.rs"
workflow_dispatch:
pull_request:
paths:
- "trampoline/**"
- ".github/workflows/trampoline.yaml"
- "src/global/trampoline.rs"
permissions:
contents: write # Allow write permissions for contents (like pushing to the repo)
pull-requests: write
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: true
matrix:
include:
- name: "Linux-x86_64"
target: x86_64-unknown-linux-musl
os: ubuntu-latest
- name: "Linux-aarch64"
target: aarch64-unknown-linux-musl
os: ubuntu-latest
- name: "Linux-powerpc64le"
target: powerpc64le-unknown-linux-gnu
os: ubuntu-latest
- name: "macOS-x86"
target: x86_64-apple-darwin
os: macos-13
- name: "macOS-arm"
target: aarch64-apple-darwin
os: macos-14
- name: "Windows"
target: x86_64-pc-windows-msvc
os: windows-latest
- name: "Windows-arm"
target: aarch64-pc-windows-msvc
os: windows-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch full history so we have branch information
- name: Set up Rust
uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target }}
- name: Set up pixi
uses: prefix-dev/[email protected]
with:
environments: trampoline
- name: Build trampoline binary
run: pixi run build-trampoline --target ${{ matrix.target }}
- name: Upload binary artifact (Windows)
uses: actions/upload-artifact@v4
with:
name: trampoline-${{ matrix.target }}
path: trampoline/binaries/pixi-trampoline-${{ matrix.target }}${{ matrix.os == 'windows-latest' && '.exe' || '' }}.zstd
aggregate:
runs-on: ubuntu-latest
needs: build # This ensures the aggregation job runs after the build jobs
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Download all binaries
uses: actions/download-artifact@v4
with:
path: trampoline/binaries/
- name: List downloaded files
run: ls -R trampoline/binaries/
- name: Upload binary artifact
uses: actions/upload-artifact@v4
with:
name: trampolines
path: trampoline/binaries/
- name: Commit and push updated binaries
# Don't run on forks
if: github.repository == 'prefix-dev/pixi' && startsWith(github.ref, 'reaf/heads')
run: |
# Set the repository to push to the repository the workflow is running on
git config user.name "GitHub Actions"
git config user.email "[email protected]"
git add trampoline/binaries/
git commit -m "[CI]: Update trampoline binaries for all targets"
# Push changes to the branch that triggered the workflow
BRANCH=${GITHUB_REF#refs/heads/}
git push origin HEAD:$BRANCH