File tree 1 file changed +2
-22
lines changed
1 file changed +2
-22
lines changed Original file line number Diff line number Diff line change @@ -35,20 +35,12 @@ jobs:
35
35
- name : Update package.json version
36
36
run : |
37
37
PACKAGE_PATH="package.json"
38
-
39
- # Check if the package.json exists at the specified path
40
38
if [ ! -f "$PACKAGE_PATH" ]; then
41
39
echo "Could not find package.json at path: $PACKAGE_PATH."
42
40
exit 1
43
41
fi
44
-
45
- # Normalize the release tag by removing a leading 'v', if present
46
42
RELEASE_TAG=${TAG#v}
47
-
48
- # Update package.json with the new version
49
43
jq --arg newver "$RELEASE_TAG" '.whisperKit.version = $newver' "$PACKAGE_PATH" > tmp.$$.json && mv tmp.$$.json "$PACKAGE_PATH"
50
-
51
- # Verify changes
52
44
cat "$PACKAGE_PATH"
53
45
54
46
- name : Commit changes
58
50
git add ./package.json
59
51
git commit -m "Update WhisperKit to $TAG"
60
52
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
-
73
53
- name : PR with changes
54
+ env :
55
+ GH_TOKEN : ${{ secrets.COMMITTER_TOKEN }}
74
56
run : |
75
- echo ${{ secrets.COMMITTER_TOKEN }} | gh auth login --with-token
76
57
gh pr create --title "Update WhisperKit to $TAG" --body "Update WhisperKit to $TAG" --base main --head $BRANCH_NAME
77
-
You can’t perform that action at this time.
0 commit comments