Skip to content

Ci/workflow test

Ci/workflow test #16

Workflow file for this run

name: Node.js CI
permissions:
contents: write
packages: write
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
build:
env:
CI: true
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Use Node.js from .nvmrc
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Install dependencies
run: npm ci
- name: Build 🔧
run: npm run build --if-present
- name: Test 🧪
run: npm run test --if-present
- name: Archive production artifacts 🚀
uses: actions/upload-artifact@v4
with:
name: lib
path: lib
release:
name: semantic-release
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
persist-credentials: false
- name: Setup Node.Js
uses: actions/setup-node@v4
with:
node-version: '20.x'
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: lib
- name: Publish package 📦
run: |
npm ci
npx semantic-release --ci
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}