Skip to content

Commit

Permalink
Merge pull request #258 from TobiTRy/240-automatic-cd-for-npm-package…
Browse files Browse the repository at this point in the history
…-deployment

Update Node.js version in checkCodeQality.yml workflow
  • Loading branch information
TobiTRy authored Mar 15, 2024
2 parents 17dea77 + b1e7494 commit 5df7578
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 16 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/checkCodeQality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20' # Specify your Node.js version here
node-version: '20'

- name: Install Dependencies
run: npm install
Expand Down
26 changes: 11 additions & 15 deletions .github/workflows/deployOnNPM.yml
Original file line number Diff line number Diff line change
@@ -1,30 +1,26 @@
name: Publish npm package
name: Publish to NPM

on:
push:
branches:
- develop
branches: [develop]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Checkout
uses: actions/checkout@v2

- name: Use Node.js
uses: actions/setup-node@v1
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '14'
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'

- name: Install dependencies
run: npm install

- name: Build (if required)
run: npm run build
- name: Install dependencies and build 🔧
run: npm ci && npm run build

- name: Publish to npm
- name: Publish package on NPM 📦
run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 5df7578

Please sign in to comment.