Skip to content

Commit

Permalink
chore(action): split test & release
Browse files Browse the repository at this point in the history
  • Loading branch information
arlac77 committed Oct 27, 2020
1 parent cc48b8a commit 68f4b09
Showing 1 changed file with 2 additions and 46 deletions.
48 changes: 2 additions & 46 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jobs:
strategy:
matrix:
node-version:
- 14.14.0
- 14.15.0
- 15.0.1
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -38,51 +38,7 @@ jobs:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.14.0
- run: npm install
- run: npx semantic-release
env:
CI: 'true'
NPM_TOKEN: '${{ secrets.NPM_TOKEN }}'
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
test:
runs-on: ubuntu-latest
strategy:
matrix:
node-version:
- 14.14.0
- 15.0.1
steps:
- uses: actions/checkout@v2
- name: Cache node modules
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: ~/.npm
key: >-
${{ runner.os }}-build-${{ env.cache-name }}-${{
hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- name: 'Build / Test Node ${{ matrix.node-version }}'
uses: actions/setup-node@v1
with:
node-version: '${{ matrix.node-version }}'
- run: npm install
- run: npm run build --if-present
- run: npm run cover --if-present
release:
needs:
- test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 14.14.0
node-version: 14.15.0
- run: npm install
- run: npx semantic-release
env:
Expand Down

0 comments on commit 68f4b09

Please sign in to comment.