Skip to content

Commit 2f4f41a

Browse files
committed
bump node version
1 parent 2f8c477 commit 2f4f41a

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

.github/workflows/test-and-publish.yml

+29-29
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ jobs:
5252
needs: [version]
5353
strategy:
5454
matrix:
55-
node-version: [16.x, 18.x, 20.x]
55+
node-version: [16.x, 18.x, 20.x, 22.x]
5656
steps:
5757
- uses: actions/checkout@v3
5858
with:
@@ -64,8 +64,8 @@ jobs:
6464
cache: 'npm'
6565
- name: Log environment setup
6666
run: |
67-
node -v
68-
npm -v
67+
node -v
68+
npm -v
6969
- name: Install dependencies
7070
run: npm install
7171
- name: Build templates
@@ -89,57 +89,57 @@ jobs:
8989
run: echo "version=$(cat next-version.txt)" >> $GITHUB_ENV
9090
- name: Configure Git
9191
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"
9494
- name: Tag commit
9595
uses: tvdias/[email protected]
9696
with:
97-
repo-token: "${{ secrets.GITHUB_TOKEN }}"
98-
tag: "${{ env.version }}"
97+
repo-token: '${{ secrets.GITHUB_TOKEN }}'
98+
tag: '${{ env.version }}'
9999
- name: Install dependencies
100100
run: npm install
101101
- uses: actions/setup-node@v3
102102
with:
103103
registry-url: 'https://registry.npmjs.org'
104-
node-version: '18.x'
104+
node-version: '22.x'
105105
- name: Configure NPM version
106106
env:
107107
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
108108
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
115115
- name: Version package
116116
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"
119119
- name: Publish to NPM
120120
run: npm publish --tag $(cat publish-tag.txt)
121121
- uses: actions/setup-node@v3
122122
with:
123-
node-version: '18.x'
123+
node-version: '22.x'
124124
registry-url: 'https://npm.pkg.github.com'
125125
- name: Configure NPM version
126126
env:
127127
NODE_AUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
128128
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
135135
- name: Publish to GPR
136136
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
143143
- name: Upload docs
144144
uses: actions/upload-artifact@v3
145145
with:

0 commit comments

Comments
 (0)