Intial #4
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: Build, Test, and Package | |
on: | |
push: | |
branches: | |
- main | |
- 'release/*' | |
pull_request: | |
branches: | |
- main | |
jobs: | |
build-test-package: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x] | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Install dependencies | |
run: npm install | |
- name: Run tests | |
run: npm test | |
- name: Build the project | |
run: npm run build | |
- name: Package the library | |
run: npm pack | |
- name: Upload package artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
name: strapi-fluent-query-builder-package | |
path: "*.tgz" |