Skip to content

Commit

Permalink
chore: update GH workflow file
Browse files Browse the repository at this point in the history
  • Loading branch information
aldeed committed May 22, 2022
1 parent 2baf6d3 commit e5b8a37
Showing 1 changed file with 31 additions and 25 deletions.
56 changes: 31 additions & 25 deletions .github/workflows/lint-test-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,18 @@ jobs:
shell: bash
working-directory: package
steps:
- name: Check out files
uses: actions/checkout@v2
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.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"
- 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
Expand All @@ -32,16 +34,18 @@ jobs:
shell: bash
working-directory: package
steps:
- name: Check out files
uses: actions/checkout@v2
- name: Use Node.js 12.x
uses: actions/setup-node@v1
with:
node-version: 12.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"
- 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 @@ -53,15 +57,17 @@ jobs:
working-directory: package
steps:
- name: Check out files
uses: actions/checkout@v2
- name: Use Node.js 12.x
uses: actions/setup-node@v1
uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 12.x
node-version: "16"
cache: "npm"
- 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 e5b8a37

Please sign in to comment.