File tree Expand file tree Collapse file tree 2 files changed +46
-2
lines changed Expand file tree Collapse file tree 2 files changed +46
-2
lines changed Original file line number Diff line number Diff line change @@ -142,7 +142,15 @@ jobs:
142
142
run : yarn install --immutable
143
143
144
144
- run : yarn turbo run build --color
145
- - name : 🚢 Publish
146
- run : yarn run ci: publish
145
+ - name : 🚢 Publish to NPM
146
+ run : yarn config set npmAuthToken "${NODE_AUTH_TOKEN}" && yarn npm publish --access public
147
147
env :
148
148
NODE_AUTH_TOKEN : ${{ secrets.NPM_AUTH_TOKEN }}
149
+
150
+ - name : 📤 Upload Artifacts
151
+ uses : actions/upload-artifact@v4
152
+ with :
153
+ name : dist
154
+ path : |
155
+ dist
156
+ overwrite : true
Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ # Function to standardize commit message
4
+ standardize_commit () {
5
+ local msg=" $1 "
6
+
7
+ # Convert to lowercase and remove parentheses
8
+ msg=$( echo " $msg " | tr ' [:upper:]' ' [:lower:]' | sed ' s/^(//;s/)$//' )
9
+
10
+ # Standardize types
11
+ msg=$( echo " $msg " | sed -E ' s/^(ft|feature):/\1eat:/' )
12
+ msg=$( echo " $msg " | sed -E ' s/^(bug|fix):/\1ix:/' )
13
+
14
+ # Add space after colon if missing
15
+ msg=$( echo " $msg " | sed ' s/:/: /' )
16
+
17
+ # Remove trailing period
18
+ msg=$( echo " $msg " | sed ' s/\.$//' )
19
+
20
+ # Convert first word to present tense if it's a past tense verb
21
+ msg=$( echo " $msg " | sed -E ' s/^(feat|fix|docs|test|refactor): (added|fixed|updated|removed|changed|modified)/\1: add|fix|update|remove|change|modify/' )
22
+
23
+ echo " $msg "
24
+ }
25
+
26
+ # Get all commit hashes
27
+ git log --pretty=format:" %H" | while read -r commit_hash; do
28
+ # Get the commit message
29
+ commit_msg=$( git log -1 --pretty=format:" %s" $commit_hash )
30
+
31
+ # Standardize the commit message
32
+ new_msg=$( standardize_commit " $commit_msg " )
33
+
34
+ # Update the commit message
35
+ git filter-branch -f --msg-filter " if [ \$ GIT_COMMIT = '$commit_hash ' ]; then echo '$new_msg '; else cat; fi" HEAD^..HEAD
36
+ done
You can’t perform that action at this time.
0 commit comments