Skip to content

Commit ad26716

Browse files
Fix expo release script (#220)
1 parent e3e21d4 commit ad26716

File tree

1 file changed

+2
-22
lines changed

1 file changed

+2
-22
lines changed

.github/workflows/expo-update.yml

+2-22
Original file line numberDiff line numberDiff line change
@@ -35,20 +35,12 @@ jobs:
3535
- name: Update package.json version
3636
run: |
3737
PACKAGE_PATH="package.json"
38-
39-
# Check if the package.json exists at the specified path
4038
if [ ! -f "$PACKAGE_PATH" ]; then
4139
echo "Could not find package.json at path: $PACKAGE_PATH."
4240
exit 1
4341
fi
44-
45-
# Normalize the release tag by removing a leading 'v', if present
4642
RELEASE_TAG=${TAG#v}
47-
48-
# Update package.json with the new version
4943
jq --arg newver "$RELEASE_TAG" '.whisperKit.version = $newver' "$PACKAGE_PATH" > tmp.$$.json && mv tmp.$$.json "$PACKAGE_PATH"
50-
51-
# Verify changes
5244
cat "$PACKAGE_PATH"
5345
5446
- name: Commit changes
@@ -58,20 +50,8 @@ jobs:
5850
git add ./package.json
5951
git commit -m "Update WhisperKit to $TAG"
6052
git push origin $BRANCH_NAME
61-
62-
- name: Install and setup GitHub CLI if necessary
63-
run: |
64-
if ! command -v gh &> /dev/null
65-
then
66-
echo "GitHub CLI is not installed, installing..."
67-
sudo apt update
68-
sudo apt install -y gh
69-
else
70-
echo "GitHub CLI is already installed"
71-
fi
72-
7353
- name: PR with changes
54+
env:
55+
GH_TOKEN: ${{ secrets.COMMITTER_TOKEN }}
7456
run: |
75-
echo ${{ secrets.COMMITTER_TOKEN }} | gh auth login --with-token
7657
gh pr create --title "Update WhisperKit to $TAG" --body "Update WhisperKit to $TAG" --base main --head $BRANCH_NAME
77-

0 commit comments

Comments
 (0)