Skip to content

Merge pull request #5 from viction-developers/workflows #1

Merge pull request #5 from viction-developers/workflows

Merge pull request #5 from viction-developers/workflows #1

Workflow file for this run

name: CI/CD Pipeline
on:
push:
branches:
- main
- 'release/*'
pull_request:
branches:
- main
jobs:
build:c
runs-on: ubuntu-latest

Check failure on line 14 in .github/workflows/ci-cd.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci-cd.yml

Invalid workflow file

You have an error in your yaml syntax on line 14
strategy:
matrix:
node-version: [18.x, 21.x]
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
run: yarn install
- name: Run tests
run: npm test
- name: Build project
run: yarn run build
publish:
if: github.event_name == 'push' && startsWith(github.ref, 'refs/heads/release/')
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: 21.x
- name: Install dependencies
run: npm install
- name: Build project
run: npm run build
- name: Publish to NPM
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npm publish