Skip to content

Commit ec9edf5

Browse files
author
Mint de Wit
committed
chore: update ci
1 parent 9791a3f commit ec9edf5

File tree

2 files changed

+22
-22
lines changed

2 files changed

+22
-22
lines changed

.github/workflows/node.yaml

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ jobs:
2121
- uses: actions/checkout@v3
2222
with:
2323
fetch-depth: 0
24-
- name: Use Node.js 14.x
24+
- name: Use Node.js 20.x
2525
uses: actions/setup-node@v3
2626
with:
27-
node-version: 14.x
27+
node-version: 20.x
2828
- name: Check release is desired
2929
id: do-publish
3030
run: |
3131
if [ -z "${{ secrets.NPM_TOKEN }}" ]; then
3232
echo "No Token"
3333
else
3434
35-
PACKAGE_NAME=$(yarn info -s . name)
36-
PUBLISHED_VERSION=$(yarn info -s $PACKAGE_NAME version)
35+
PACKAGE_NAME=$(npm info -s . name)
36+
PUBLISHED_VERSION=$(npm info -s $PACKAGE_NAME version)
3737
THIS_VERSION=$(node -p "require('./package.json').version")
3838
# Simple bash helper to comapre version numbers
3939
verlte() {
@@ -55,21 +55,21 @@ jobs:
5555
- name: Prepare build
5656
if: ${{ steps.do-publish.outputs.tag }}
5757
run: |
58-
yarn install
58+
npm install
5959
env:
6060
CI: true
6161
- name: Build library
6262
if: ${{ steps.do-publish.outputs.tag }}
6363
run: |
64-
yarn build
64+
npm run build
6565
env:
6666
CI: true
6767
- name: Publish to NPM
6868
if: ${{ steps.do-publish.outputs.tag }}
6969
run: |
7070
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
7171
NEW_VERSION=$(node -p "require('./package.json').version")
72-
yarn publish --access=public --new-version=$NEW_VERSION --network-timeout 100000 --tag ${{ steps.do-publish.outputs.tag }}
72+
npm publish --access=public --new-version=$NEW_VERSION --network-timeout 100000 --tag ${{ steps.do-publish.outputs.tag }}
7373
7474
echo "**Published:** $NEW_VERSION" >> $GITHUB_STEP_SUMMARY
7575
env:
@@ -82,19 +82,19 @@ jobs:
8282

8383
steps:
8484
- uses: actions/checkout@v3
85-
- name: Use Node.js 14.x
85+
- name: Use Node.js 20.x
8686
uses: actions/setup-node@v3
8787
with:
88-
node-version: 14.x
88+
node-version: 20.x
8989
- name: Prepare Environment
9090
run: |
91-
yarn install
91+
npm install
9292
env:
9393
CI: true
9494
- name: Validate production dependencies
9595
run: |
9696
if ! git log --format=oneline -n 1 | grep -q "\[ignore-audit\]"; then
97-
yarn validate:dependencies
97+
npm run validate:dependencies
9898
else
9999
echo "Skipping audit"
100100
fi
@@ -109,22 +109,22 @@ jobs:
109109

110110
steps:
111111
- uses: actions/checkout@v3
112-
- name: Use Node.js 14.x
112+
- name: Use Node.js 20.x
113113
uses: actions/setup-node@v3
114114
with:
115-
node-version: 14.x
115+
node-version: 20.x
116116
- name: Prepare Environment
117117
run: |
118-
yarn install
118+
npm install
119119
env:
120120
CI: true
121121
- name: Validate production dependencies
122122
run: |
123-
yarn validate:dependencies
123+
npm run validate:dependencies
124124
env:
125125
CI: true
126126
- name: Validate dev dependencies
127127
run: |
128-
yarn validate:dev-dependencies
128+
npm run validate:dev-dependencies
129129
env:
130130
CI: true

.github/workflows/publish.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ jobs:
1414
- uses: actions/checkout@v3
1515
with:
1616
fetch-depth: 0
17-
- name: Use Node.js 14.x
17+
- name: Use Node.js 20.x
1818
uses: actions/setup-node@v3
1919
with:
20-
node-version: 14.x
20+
node-version: 20.x
2121
- name: Check release is desired
2222
id: do-publish
2323
run: |
@@ -33,28 +33,28 @@ jobs:
3333
- name: Prepare Environment
3434
if: ${{ steps.do-publish.outputs.publish }}
3535
run: |
36-
yarn install
36+
npm install
3737
env:
3838
CI: true
3939
- name: Build library
4040
if: ${{ steps.do-publish.outputs.publish }}
4141
run: |
42-
yarn build
42+
npm run build
4343
env:
4444
CI: true
4545
- name: Bump version
4646
if: ${{ steps.do-publish.outputs.publish }}
4747
run: |
4848
PRERELEASE_TAG=nightly-$(echo "${{ github.ref_name }}" | sed -r 's/[^a-z0-9]+/-/gi')
49-
yarn release --prerelease $PRERELEASE_TAG
49+
npm run release --prerelease $PRERELEASE_TAG
5050
env:
5151
CI: true
5252
- name: Publish to NPM
5353
if: ${{ steps.do-publish.outputs.publish }}
5454
run: |
5555
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" >> ~/.npmrc
5656
NEW_VERSION=$(node -p "require('./package.json').version")
57-
yarn publish --access=public --new-version=$NEW_VERSION --network-timeout 100000 --tag "${{ steps.do-publish.outputs.publish }}"
57+
npm publish --access=public --new-version=$NEW_VERSION --network-timeout 100000 --tag "${{ steps.do-publish.outputs.publish }}"
5858
echo "**Published:** $NEW_VERSION" >> $GITHUB_STEP_SUMMARY
5959
env:
6060
CI: true

0 commit comments

Comments
 (0)