fixed tests #15
Workflow file for this run
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: CI/CD | |
on: | |
push: | |
branches: | |
- '**' | |
jobs: | |
tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '20.12.0' | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-node-modules | |
with: | |
path: '**/node_modules' | |
key: ${{ runner.os }}-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
- name: Install and test | |
run: | | |
npm install | |
npm test | |
publish: | |
runs-on: ubuntu-latest | |
needs: [ tests ] | |
# if: github.ref == 'refs/heads/main' | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: '20.12.0' | |
- name: Install dependencies | |
run: npm install | |
- name: Build | |
run: npm run build | |
- name: Create github release | |
run: npx semantic-release | |
env: | |
GITHUB_TOKEN: ${{ secrets.CICD_RELEASE_GITHUB_TOKEN }} | |
- name: Configure npm for publishing | |
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc | |
# - name: Publish | |
# run: npm publish | |
# env: | |
# NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} |