diff --git a/.github/workflows/expo-update.yml b/.github/workflows/expo-update.yml index 02262b25..082acd18 100644 --- a/.github/workflows/expo-update.yml +++ b/.github/workflows/expo-update.yml @@ -35,20 +35,12 @@ jobs: - name: Update package.json version run: | PACKAGE_PATH="package.json" - - # Check if the package.json exists at the specified path if [ ! -f "$PACKAGE_PATH" ]; then echo "Could not find package.json at path: $PACKAGE_PATH." exit 1 fi - - # Normalize the release tag by removing a leading 'v', if present RELEASE_TAG=${TAG#v} - - # Update package.json with the new version jq --arg newver "$RELEASE_TAG" '.whisperKit.version = $newver' "$PACKAGE_PATH" > tmp.$$.json && mv tmp.$$.json "$PACKAGE_PATH" - - # Verify changes cat "$PACKAGE_PATH" - name: Commit changes @@ -58,20 +50,8 @@ jobs: git add ./package.json git commit -m "Update WhisperKit to $TAG" git push origin $BRANCH_NAME - - - name: Install and setup GitHub CLI if necessary - run: | - if ! command -v gh &> /dev/null - then - echo "GitHub CLI is not installed, installing..." - sudo apt update - sudo apt install -y gh - else - echo "GitHub CLI is already installed" - fi - - name: PR with changes + env: + GH_TOKEN: ${{ secrets.COMMITTER_TOKEN }} run: | - echo ${{ secrets.COMMITTER_TOKEN }} | gh auth login --with-token gh pr create --title "Update WhisperKit to $TAG" --body "Update WhisperKit to $TAG" --base main --head $BRANCH_NAME -