Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
82 changes: 34 additions & 48 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,21 @@
name: Release

on:
push:
branches:
- main
# push:
# branches:
# - main
pull_request:
branches:
- "*"

jobs:
test-and-build:
permissions:
contents: write
pull-requests: write
issues: write
packages: write
runs-on: ubuntu-latest

strategy:
matrix:
node-version: [20.x]

if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -34,42 +28,34 @@ jobs:
registry-url: "https://registry.npmjs.org/"

- run: npm ci
- run: npm run build
- run: npm run test:badges

publish:
needs: [test-and-build]
runs-on: ubuntu-latest

if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Required for semantic-release

- name: Use Node.js {{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: "https://registry.npmjs.org/"

- run: npm ci
- run: npm run build
- run: npm run test:badges

- name: Debug secrets
run: |
echo "NPM_TOKEN set? ${{ secrets.NPM_TOKEN != '' }}"
echo "GITHUB_TOKEN set? ${{ secrets.GITHUB_TOKEN != '' }}"

- name: Set up .npmrc with auth token
run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}"
# run: echo "//registry.npmjs.org/:_authToken=${NPM_TOKEN}" > /home/runner/work/_temp/.npmrc
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Run semantic-release
run: npx semantic-release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
- run: npm run test

# publish:
# permissions:
# contents: write
# pull-requests: write
# issues: write
# packages: write
# needs: [test-and-build]
# runs-on: ubuntu-latest

# if: github.ref == 'refs/heads/main'
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0 # Required for semantic-release

# - name: Use Node.js {{ matrix.node-version }}
# uses: actions/setup-node@v4
# with:
# node-version: ${{ matrix.node-version }}
# registry-url: "https://registry.npmjs.org/"

# - run: npm ci
# - run: npm run build

# - name: Run semantic-release
# run: npx semantic-release
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
23 changes: 0 additions & 23 deletions .releaserc

This file was deleted.

104 changes: 2 additions & 102 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 2 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@arunkumar_h/rule-engine",
"version": "0.0.0-development",
"version": "1.3.0",
"license": "MIT",
"main": "dist/index.js",
"types": "dist/index.d.ts",
Expand All @@ -19,20 +19,15 @@
"access": "public"
},
"scripts": {
"test": "jest --coverage",
"test": "jest",
"test:coverage": "npm test --coverage",
"test:badges": "npm run test:coverage && jest-coverage-badges output ./badges",
"build": "tsc",
"tsup_build": "tsup src/index.ts --dts --format cjs --out-dir dist",
"prepare": "husky",
"semantic-release": "semantic-release --branches main",
"commit": "cz"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@semantic-release/github": "^11.0.1",
"@semantic-release/npm": "^12.0.1",
"@types/jest": "^29.5.14",
"@types/lodash.endswith": "^4.2.9",
"@types/lodash.get": "^4.4.9",
Expand Down