@@ -119,23 +119,36 @@ jobs:
119119 uses : " actions/checkout@v4"
120120 with :
121121 ref : ${{ github.ref }}
122- token : ${{ secrets.GITHUB_TOKEN }}
122+ token : ${{ secrets.PACKAGES_ADMIN_TOKEN }}
123+ fetch-depth : 0
123124
124- - name : " cat package.json"
125- run : cat ./package.json
125+ - name : Setup Git
126+ run : |
127+ git config --local user.email "[email protected] " 128+ git config --local user.name "GitHub Action"
126129
127- - name : " Automated Version Bump "
128- uses : " phips28/gh-action-bump- version@master "
129- with :
130- minor-wording : " solaceminor,SolaceMinor,SOLACEMINOR "
131- major-wording : " solacemajor,SolaceMajor,SOLACEMAJOR "
132- patch-wording : " solacepatch,SolacePatch,SOLACEPATCH "
133- tag-prefix : " "
134- commit-message : " CI: bumps version to {{version}} [skip ci] " # Add skip ci tag
130+ - name : Install standard-version
131+ run : npm install -g standard- version
132+
133+ - name : Bump version
134+ run : |
135+ npx standard-version
136+
137+ - name : Push changes
135138 env :
136- # Required for version bumping and by-passing branch protection
137- GITHUB_TOKEN : ${{ secrets.PACKAGES_ADMIN_TOKEN }}
138- - name : " cat package.json"
139- run : cat ./package.json
139+ COMMIT_KEY : ${{ secrets.PACKAGES_ADMIN_TOKEN }}
140+ SSH_AUTH_SOCK : /tmp/ssh_agent.sock
141+ run : |
142+ # Remove default token (read-only)
143+ git config --unset http.https://github.com/.extraheader
144+ # Setup ssh access
145+ mkdir -p ~/.ssh
146+ ssh-keyscan github.com >> ~/.ssh/known_hosts
147+ ssh-agent -a $SSH_AUTH_SOCK > /dev/null
148+ ssh-add - <<< "${COMMIT_KEY}"
149+ git config --add [email protected] :.insteadof https://github.com/ 150+
151+ # Push with tags
152+ git push --follow-tags origin
153+
140154
141-
0 commit comments