update_airlift_binary #8
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: update_airlift_binary | |
on: | |
workflow_dispatch: | |
jobs: | |
update_binary: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Get latest release info | |
id: get_release | |
run: | | |
response=$(curl -sSL https://api.github.com/repos/TheAcharya/Airlift/releases/latest) | |
latest_release_tag=$(echo "$response" | jq -r '.tag_name | ltrimstr("v")') | |
latest_release_url=$(echo "$response" | jq -r '.assets[] | select(.name | test("bin_airlift_.*_macos_x64.zip$")) | .browser_download_url') | |
echo "Latest release tag: $latest_release_tag" | |
echo "Latest release URL: $latest_release_url" | |
if [[ -z "$latest_release_url" ]]; then | |
echo "No valid download URL found for macOS x64 binary." | |
exit 1 | |
fi | |
curl -L -o airlift.zip $latest_release_url | |
unzip airlift.zip -d extracted_files | |
cp -R ./extracted_files/dist/airlift "./Source/Marker Data/Marker Data/Resources" | |
- name: Commit and Push Update | |
run: | | |
git status | |
git config user.name "GitHub Actions" | |
git config user.email "[email protected]" | |
git add Source | |
git commit -m "Updated Airlift Binary Version $latest_release_tag" | |
git push |