Skip to content

Commit

Permalink
chore: improved actions
Browse files Browse the repository at this point in the history
  • Loading branch information
joamag committed Nov 9, 2024
1 parent 038e792 commit 69541e1
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 16 deletions.
23 changes: 16 additions & 7 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,13 +13,22 @@ jobs:
runs-on: ubuntu-latest
container: node:${{ matrix.node-version }}-buster
steps:
- uses: actions/checkout@v4
- run: node --version
- run: npm install
- run: npm install --only=dev
- run: npm run lint
- run: npm test
- run: |
- name: Checkout code from repository
uses: actions/checkout@v4
- name: Print Node.js information
run: node --version
- name: Install package
run: npm install
- name: Install package (development)
run: npm install --only=dev
- name: Build package
run: npm run build
- name: Verify Javascript code linting
run: npm run lint
- name: Run unit tests
run: npm test
- name: Deploy package to NPM
run: |
echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > ~/.npmrc
npm publish
env:
Expand Down
29 changes: 20 additions & 9 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,18 +1,29 @@
name: Main Workflow
on: [push]
on:
push:
schedule:
- cron: "0 0 * * 0"
jobs:
build:
name: Build
timeout-minutes: 10
strategy:
matrix:
node-version: [14, 15, 16, 17, 18, 19, 20, 21, 22]
node-version: [14, 16, 17, 18, 19, 20]
runs-on: ubuntu-latest
container: node:${{ matrix.node-version }}
container: node:${{ matrix.node-version }}-buster
steps:
- uses: actions/checkout@v4
- run: node --version
- run: npm install
- run: npm install --only=dev
- run: npm run lint
- run: npm test
- name: Checkout code from repository
uses: actions/checkout@v4
- name: Print Node.js information
run: node --version
- name: Install package
run: npm install
- name: Install package (development)
run: npm install --only=dev
- name: Build package
run: npm run build
- name: Verify Javascript code linting
run: npm run lint
- name: Run unit tests
run: npm test

0 comments on commit 69541e1

Please sign in to comment.