Skip to content

Commit 3c40954

Browse files
committed
chore: update workflows
1 parent f0f0bac commit 3c40954

File tree

2 files changed

+13
-65
lines changed

2 files changed

+13
-65
lines changed

.github/workflows/nodejs.yml

Lines changed: 5 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -6,40 +6,9 @@ on:
66
- main
77
pull_request:
88

9-
env:
10-
NODE_VERSION: 16.x
11-
129
jobs:
13-
lint:
14-
runs-on: ubuntu-latest
15-
steps:
16-
- uses: actions/checkout@v2
17-
- uses: actions/setup-node@v2
18-
with:
19-
node-version: ${{ env.NODE_VERSION }}
20-
- name: Install dependencies
21-
run: npm install
22-
- name: Run ESLint
23-
run: npm run eslint
24-
- name: Run Prettier
25-
run: npm run prettier
26-
- name: Check types
27-
run: npm run check-types
28-
test:
29-
runs-on: ubuntu-latest
30-
strategy:
31-
matrix:
32-
node-version: [14.x, 16.x, 18.x]
33-
fail-fast: false
34-
steps:
35-
- uses: actions/checkout@v2
36-
- name: Use Node.js ${{ matrix.node-version }}
37-
uses: actions/setup-node@v2
38-
with:
39-
node-version: ${{ matrix.node-version }}
40-
- name: Install dependencies
41-
run: npm install
42-
- name: Run tests
43-
run: npm run test-only
44-
- name: Send coverage report to Codecov
45-
uses: codecov/codecov-action@v2
10+
nodejs:
11+
# Documentation: https://github.com/zakodium/workflows#nodejs-ci
12+
uses: zakodium/workflows/.github/workflows/nodejs.yml@nodejs-v1
13+
with:
14+
lint-check-types: true

.github/workflows/release.yml

Lines changed: 8 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -5,33 +5,12 @@ on:
55
branches:
66
- main
77

8-
env:
9-
NODE_VERSION: 16.x
10-
118
jobs:
12-
release-please:
13-
runs-on: ubuntu-latest
14-
steps:
15-
- name: Get package name
16-
run: echo "PACKAGE_NAME=$(jq .name package.json | tr -d '"')" >> $GITHUB_ENV
17-
- uses: GoogleCloudPlatform/release-please-action@v2
18-
id: release
19-
with:
20-
token: ${{ secrets.BOT_TOKEN }}
21-
release-type: node
22-
package-name: ${{ env.PACKAGE_NAME }}
23-
bump-minor-pre-major: Yes
24-
- uses: actions/checkout@v2
25-
# These if statements ensure that a publication only occurs when a new release is created
26-
if: ${{ steps.release.outputs.release_created }}
27-
- uses: actions/setup-node@v2
28-
with:
29-
node-version: ${{ env.NODE_VERSION }}
30-
registry-url: 'https://registry.npmjs.org'
31-
if: ${{ steps.release.outputs.release_created }}
32-
- run: npm install
33-
if: ${{ steps.release.outputs.release_created }}
34-
- run: npm publish --access public
35-
env:
36-
NODE_AUTH_TOKEN: ${{ secrets.NPM_BOT_TOKEN }}
37-
if: ${{ steps.release.outputs.release_created }}
9+
release:
10+
# Documentation: https://github.com/zakodium/workflows#release
11+
uses: zakodium/workflows/.github/workflows/release.yml@release-v1
12+
with:
13+
npm: true
14+
secrets:
15+
github-token: ${{ secrets.BOT_TOKEN }}
16+
npm-token: ${{ secrets.NPM_BOT_TOKEN }}

0 commit comments

Comments
 (0)