Skip to content

Commit

Permalink
chore: update GitHub workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
aldeed committed Jan 9, 2023
1 parent 5e94b3a commit 48cd5ce
Showing 1 changed file with 34 additions and 25 deletions.
59 changes: 34 additions & 25 deletions .github/workflows/lint-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,33 +13,39 @@ jobs:
run:
shell: bash
steps:
- name: Check out files
uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install package dependencies
run: npm ci
- name: Lint code
run: npm run lint --if-present
- name: Check out files
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
cache: "npm"
cache-dependency-path: package-lock.json
- name: Update to latest NPM version
run: npm i -g npm
- name: Install package dependencies
run: npm ci
- name: Lint code
run: npm run lint --if-present

test:
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Check out files
uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
with:
node-version: 14.x
- name: Install package dependencies
run: npm ci
- name: Test code
run: npm run test --if-present
- name: Check out files
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: "16"
cache: "npm"
cache-dependency-path: package-lock.json
- name: Update to latest NPM version
run: npm i -g npm
- name: Install package dependencies
run: npm ci
- name: Test code
run: npm run test --if-present

publish:
runs-on: ubuntu-latest
Expand All @@ -50,15 +56,18 @@ jobs:
shell: bash
steps:
- name: Check out files
uses: actions/checkout@v2
- name: Use Node.js 14.x
uses: actions/setup-node@v1
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14.x
node-version: "16"
cache: "npm"
cache-dependency-path: package-lock.json
- name: Update to latest NPM version
run: npm i -g npm
- name: Install package dependencies
run: npm ci
- name: Semantic Release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 48cd5ce

Please sign in to comment.