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

Workflow file for this run

name: Update bindings for macOS
on:
push:
branches:
- dev
paths:
- Cargo.lock
jobs:
update-bindings:
runs-on: macos-latest
steps:
- uses: actions/[email protected]
- name: Update Bindings
run: |
cargo run -p update-bindings -- -b -d aarch64-apple-darwin
cargo run -p update-bindings -- -b -d x86_64-apple-darwin
- 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 | xargs))
FILES=""
for value in ${CHANGED[@]}; do
base64 -b 0 -i "${value}" -o "${value}.base64"
FILES="${FILES} -F files[][path]=${value} -F files[][contents]=@${value}.base64"
done
if [ "${FILES}" != "" ]; then
git switch -c update-macos
git push --force -u origin update-macos
gh api graphql \
-F githubRepository=${GITHUB_REPOSITORY} \
-F branchName=update-macos \
-F expectedHeadOid=$(git rev-parse HEAD) \
-F 'commitMessage=chore: update macos bindings' \
-F [email protected]/api/createCommitOnBranch.graphql \
${FILES}
git restore --staged .
git restore .
git clean -f
git pull
gh pr create -f
fi