Skip to content

Commit 2ad8722

Browse files
committed
Update Node.js versions for CI
1 parent f041efe commit 2ad8722

File tree

2 files changed

+39
-39
lines changed

2 files changed

+39
-39
lines changed

.github/workflows/build.yml

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -2,30 +2,30 @@ name: Node.js CI
22

33
on:
44
push:
5-
branches: [ main ]
5+
branches: [main]
66
pull_request:
7-
branches: [ main ]
7+
branches: [main]
88

99
jobs:
1010
build:
1111
runs-on: ${{ matrix.os }}
1212
strategy:
1313
matrix:
1414
os: [ubuntu-latest]
15-
node-version: [14.x, 16.x, 18.x]
15+
node-version: [18.x, 20.x]
1616

1717
steps:
18-
- uses: actions/checkout@v2
19-
- name: Use Node.js ${{ matrix.node-version }}
20-
uses: actions/setup-node@v1
21-
with:
22-
node-version: ${{ matrix.node-version }}
18+
- uses: actions/checkout@v2
19+
- name: Use Node.js ${{ matrix.node-version }}
20+
uses: actions/setup-node@v1
21+
with:
22+
node-version: ${{ matrix.node-version }}
2323

24-
- run: npm i -g npm@latest
24+
- run: npm i -g npm@latest
2525

26-
- run: npm i -ws
27-
- run: npm run lint -ws
28-
- run: npm run build -ws
26+
- run: npm i -ws
27+
- run: npm run lint -ws
28+
- run: npm run build -ws
2929
# TODO - tests
3030
# - run: npm test
3131

@@ -34,10 +34,10 @@ jobs:
3434
runs-on: ubuntu-latest
3535
steps:
3636
- uses: actions/checkout@v2
37-
- name: Use Node.js 14.x
37+
- name: Use Node.js 20.x
3838
uses: actions/setup-node@v1
3939
with:
40-
node-version: 16.x
40+
node-version: 20.x
4141

4242
- run: npm i -g npm@latest
4343

@@ -48,25 +48,25 @@ jobs:
4848
- name: Upload
4949
uses: actions/upload-artifact@v2
5050
with:
51-
name: package
52-
path: "aaronpowell*.tgz"
51+
name: package
52+
path: "aaronpowell*.tgz"
5353

5454
publish:
5555
name: "Publish to GitHub Packages"
5656
needs: [package]
5757
runs-on: ubuntu-latest
5858
if: github.repository_owner == 'aaronpowell' # && github.token != ''
5959
steps:
60-
- name: Upload
61-
uses: actions/download-artifact@v2
62-
with:
60+
- name: Upload
61+
uses: actions/download-artifact@v2
62+
with:
6363
name: package
64-
- uses: actions/setup-node@v1
65-
with:
66-
node-version: ${{ env.NODE_VERSION }}
67-
registry-url: https://npm.pkg.github.com/
68-
scope: "@aaronpowell"
69-
- run: echo "registry=https://npm.pkg.github.com/@aaronpowell" >> .npmrc
70-
- run: npm publish $(ls *.tgz)
71-
env:
72-
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
64+
- uses: actions/setup-node@v1
65+
with:
66+
node-version: ${{ env.NODE_VERSION }}
67+
registry-url: https://npm.pkg.github.com/
68+
scope: "@aaronpowell"
69+
- run: echo "registry=https://npm.pkg.github.com/@aaronpowell" >> .npmrc
70+
- run: npm publish $(ls *.tgz)
71+
env:
72+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

.github/workflows/npm-release.yml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ on:
66
- v* #version is cut
77

88
env:
9-
NODE_VERSION: 16
9+
NODE_VERSION: 20
1010

1111
jobs:
1212
build:
@@ -40,24 +40,24 @@ jobs:
4040
- name: Upload
4141
uses: actions/upload-artifact@v2
4242
with:
43-
name: package
44-
path: "aaronpowell*.tgz"
43+
name: package
44+
path: "aaronpowell*.tgz"
4545
- run: echo "tag=${GITHUB_REF##*/v}" >> $GITHUB_ENV
4646
- name: Upload package to release
4747
uses: actions/upload-release-asset@v1
4848
env:
4949
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
5050
with:
51-
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
52-
asset_path: 'aaronpowell-react-static-web-apps-auth-${{ env.tag }}.tgz'
53-
asset_name: 'aaronpowell-react-static-web-apps-auth-${{ env.tag }}.tgz'
51+
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
52+
asset_path: "aaronpowell-react-static-web-apps-auth-${{ env.tag }}.tgz"
53+
asset_name: "aaronpowell-react-static-web-apps-auth-${{ env.tag }}.tgz"
5454
asset_content_type: application/zip
5555
- run: echo ${{ steps.create_release.outputs.id }} >> release.txt
5656
- name: Upload
5757
uses: actions/upload-artifact@v2
5858
with:
59-
name: release_id
60-
path: release.txt
59+
name: release_id
60+
path: release.txt
6161

6262
release:
6363
needs: build
@@ -68,7 +68,7 @@ jobs:
6868
- name: Download package
6969
uses: actions/download-artifact@v2
7070
with:
71-
name: release_id
71+
name: release_id
7272
- run: echo "release_id=$(cat release.txt)" >> $GITHUB_ENV
7373
- name: Publish release
7474
uses: actions/github-script@v3
@@ -89,7 +89,7 @@ jobs:
8989
- name: Download package
9090
uses: actions/download-artifact@v2
9191
with:
92-
name: package
92+
name: package
9393
- uses: actions/setup-node@v1
9494
with:
9595
node-version: ${{ env.NODE_VERSION }}
@@ -115,4 +115,4 @@ jobs:
115115
- run: echo "registry=https://npm.pkg.github.com/@aaronpowell" >> .npmrc
116116
- run: npm publish $(ls *.tgz) --access public
117117
env:
118-
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
118+
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}

0 commit comments

Comments
 (0)