Merge pull request #18 from Turtlator/main #40
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Main Updated | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [ 18.x ] | |
name: Build and test with Node ${{ matrix.node-version }} | |
steps: | |
- name: Checkout source code | |
uses: actions/checkout@v3 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v2 | |
with: | |
node-version: ${{ matrix.node-version }} | |
# == Cache frequently built and/or with large dependencies == | |
# == Eviction policy: not accessed in over 7 days | |
# == Limit: 10 GB | |
# cache: 'npm' | |
# == Path to lock file when using mono repos == | |
# cache-dependency-path: subdir/package-lock.json | |
- name: Restore packages | |
run: npm ci | |
- name: Run tests | |
run: npm run test:ci | |
- name: Run build | |
run: npm run build | |
- name: Publish (cli) (if version has been updated) | |
uses: JS-DevTools/npm-publish@v1 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
access: "public" | |
package: 'dist/cli/package.json' | |
check-version: true | |
- name: Publish (runtime) (if version has been updated) | |
uses: JS-DevTools/npm-publish@v1 | |
with: | |
token: ${{ secrets.NPM_TOKEN }} | |
access: "public" | |
package: 'dist/runtime/package.json' | |
check-version: true |