Skip to content

Commit

Permalink
Fix expo release script (#220)
Browse files Browse the repository at this point in the history
  • Loading branch information
ZachNagengast authored Oct 14, 2024
1 parent e3e21d4 commit ad26716
Showing 1 changed file with 2 additions and 22 deletions.
24 changes: 2 additions & 22 deletions .github/workflows/expo-update.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

0 comments on commit ad26716

Please sign in to comment.