Skip to content

Commit 42f2a80

Browse files
Reapply "wip"
This reverts commit 56ed6dd.
1 parent 56ed6dd commit 42f2a80

File tree

2 files changed

+85
-16
lines changed

2 files changed

+85
-16
lines changed

.github/workflows/push.yaml

Lines changed: 29 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -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-

.versionrc

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
{
2+
"types": [
3+
{
4+
"type": "solacemajor",
5+
"section": "Major Changes",
6+
"hidden": false
7+
},
8+
{
9+
"type": "SolaceMajor",
10+
"section": "Major Changes",
11+
"hidden": false
12+
},
13+
{
14+
"type": "SOLACEMAJOR",
15+
"section": "Major Changes",
16+
"hidden": false
17+
},
18+
{
19+
"type": "solaceminor",
20+
"section": "Minor Changes",
21+
"hidden": false
22+
},
23+
{
24+
"type": "SolaceMinor",
25+
"section": "Minor Changes",
26+
"hidden": false
27+
},
28+
{
29+
"type": "SOLACEMINOR",
30+
"section": "Minor Changes",
31+
"hidden": false
32+
},
33+
{
34+
"type": "solacepatch",
35+
"section": "Patch Changes",
36+
"hidden": false
37+
},
38+
{
39+
"type": "SolacePatch",
40+
"section": "Patch Changes",
41+
"hidden": false
42+
},
43+
{
44+
"type": "SOLACEPATCH",
45+
"section": "Patch Changes",
46+
"hidden": false
47+
}
48+
],
49+
"commitAll": true,
50+
"skip": {
51+
"tag": true
52+
},
53+
"scripts": {
54+
"postbump": "git add . && git commit -m 'chore(release): %s [skip ci]'"
55+
}
56+
}

0 commit comments

Comments
 (0)