52
52
needs : [version]
53
53
strategy :
54
54
matrix :
55
- node-version : [16.x, 18.x, 20.x]
55
+ node-version : [16.x, 18.x, 20.x, 22.x ]
56
56
steps :
57
57
- uses : actions/checkout@v3
58
58
with :
64
64
cache : ' npm'
65
65
- name : Log environment setup
66
66
run : |
67
- node -v
68
- npm -v
67
+ node -v
68
+ npm -v
69
69
- name : Install dependencies
70
70
run : npm install
71
71
- name : Build templates
@@ -89,57 +89,57 @@ jobs:
89
89
run : echo "version=$(cat next-version.txt)" >> $GITHUB_ENV
90
90
- name : Configure Git
91
91
run : |
92
- git config user.email "[email protected] "
93
- git config user.name "GitHub Actions"
92
+ git config user.email "[email protected] "
93
+ git config user.name "GitHub Actions"
94
94
- name : Tag commit
95
95
96
96
with :
97
- repo-token : " ${{ secrets.GITHUB_TOKEN }}"
98
- tag : " ${{ env.version }}"
97
+ repo-token : ' ${{ secrets.GITHUB_TOKEN }}'
98
+ tag : ' ${{ env.version }}'
99
99
- name : Install dependencies
100
100
run : npm install
101
101
- uses : actions/setup-node@v3
102
102
with :
103
103
registry-url : ' https://registry.npmjs.org'
104
- node-version : ' 18 .x'
104
+ node-version : ' 22 .x'
105
105
- name : Configure NPM version
106
106
env :
107
107
NODE_AUTH_TOKEN : ${{ secrets.NPM_TOKEN }}
108
108
run : |
109
- rm -f .npmrc
110
- touch .npmrc
111
- echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc
112
- echo "registry=https://registry.npmjs.org/" >> .npmrc
113
- echo "access=public" >> .npmrc
114
- echo "save-exact=true" >> .npmrc
109
+ rm -f .npmrc
110
+ touch .npmrc
111
+ echo "//registry.npmjs.org/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc
112
+ echo "registry=https://registry.npmjs.org/" >> .npmrc
113
+ echo "access=public" >> .npmrc
114
+ echo "save-exact=true" >> .npmrc
115
115
- name : Version package
116
116
run : |
117
- # Update version in packages to publish
118
- npm version $(cat next-version.txt) -m "Release version %s"
117
+ # Update version in packages to publish
118
+ npm version $(cat next-version.txt) -m "Release version %s"
119
119
- name : Publish to NPM
120
120
run : npm publish --tag $(cat publish-tag.txt)
121
121
- uses : actions/setup-node@v3
122
122
with :
123
- node-version : ' 18 .x'
123
+ node-version : ' 22 .x'
124
124
registry-url : ' https://npm.pkg.github.com'
125
125
- name : Configure NPM version
126
126
env :
127
127
NODE_AUTH_TOKEN : ${{ secrets.GITHUB_TOKEN }}
128
128
run : |
129
- rm -f .npmrc
130
- touch .npmrc
131
- echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc
132
- echo "@rtfpessoa:registry=https://npm.pkg.github.com/" >> .npmrc
133
- echo "access=public" >> .npmrc
134
- echo "save-exact=true" >> .npmrc
129
+ rm -f .npmrc
130
+ touch .npmrc
131
+ echo "//npm.pkg.github.com/:_authToken=${NODE_AUTH_TOKEN}" >> .npmrc
132
+ echo "@rtfpessoa:registry=https://npm.pkg.github.com/" >> .npmrc
133
+ echo "access=public" >> .npmrc
134
+ echo "save-exact=true" >> .npmrc
135
135
- name : Publish to GPR
136
136
run : |
137
- # HACK: Override npm package name to be able to publish in GitHub
138
- sed -i 's/^ "name":.*/ "name": "@rtfpessoa\/diff2html",/g' package.json
139
- echo "Going to publish version $(cat next-version.txt) to GitHub"
140
- npm publish --tag $(cat publish-tag.txt)
141
- # HACK: Restore npm package name
142
- sed -i 's/^ "name":.*/ "name": "diff2html",/g' package.json
137
+ # HACK: Override npm package name to be able to publish in GitHub
138
+ sed -i 's/^ "name":.*/ "name": "@rtfpessoa\/diff2html",/g' package.json
139
+ echo "Going to publish version $(cat next-version.txt) to GitHub"
140
+ npm publish --tag $(cat publish-tag.txt)
141
+ # HACK: Restore npm package name
142
+ sed -i 's/^ "name":.*/ "name": "diff2html",/g' package.json
143
143
- name : Upload docs
144
144
uses : actions/upload-artifact@v3
145
145
with :
0 commit comments