Skip to content

Merge pull request #37 from tauri-apps/renovate/indicatif-0.x-lockfile #8

Merge pull request #37 from tauri-apps/renovate/indicatif-0.x-lockfile

Merge pull request #37 from tauri-apps/renovate/indicatif-0.x-lockfile #8

name: Update bindings for Windows
on:
push:
branches:
- dev
paths:
- Cargo.lock
jobs:
update-bindings:
runs-on: windows-latest
steps:
- uses: actions/[email protected]
- name: Update Bindings
run: |
cargo run -p update-bindings -- -b -d x86_64-pc-windows-msvc
cargo run -p update-bindings -- -b -d aarch64-pc-windows-msvc
cargo run -p update-bindings -- -b -d i686-pc-windows-msvc
- name: Push Changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "tauri"
git config user.email "[email protected]"
git add .
$changed = @(git diff --name-only --staged)
$files = @()
$changed | %{
$contents = [System.IO.File]::ReadAllBytes($_)
$base64Contents = [System.Convert]::ToBase64String($contents)
Set-Content -NoNewline -Path "$_.base64" -Value $base64Contents
$files += "-F"
$files += "files[][path]=$_"
$files += "-F"
$files += "files[][contents]=@$_.base64"
}
if ($files.Length -gt 0) {
git switch -c update-windows
git push --force -u origin update-windows
gh api graphql `
-F githubRepository=${env:GITHUB_REPOSITORY} `
-F branchName=update-windows `
-F expectedHeadOid=$(git rev-parse HEAD) `
-F 'commitMessage=chore: update windows bindings' `
-F [email protected]/api/createCommitOnBranch.graphql `
$files
git restore --staged .
git restore .
git clean -f
git pull
gh pr create -f
}