Skip to content

Commit

Permalink
Merge pull request #24 from knowbee/ch-release-workflow-for-automated…
Browse files Browse the repository at this point in the history
…-publish-to-npm

Adds release workflow
  • Loading branch information
knowbee committed Jul 12, 2023
2 parents e7ae267 + fe591ff commit 23a1557
Show file tree
Hide file tree
Showing 4 changed files with 883 additions and 640 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
name: CI/CD
name: CI/CD

on:
pull_request:
push:

jobs:
audit:
name: audit
Expand All @@ -13,7 +13,7 @@ jobs:
- uses: actions/setup-node@v2
with:
node-version: 12
- run: npm i
- run: npm i
- run: npm audit --production --level-critical
- run: npm run lint
test:
Expand All @@ -25,4 +25,4 @@ jobs:
with:
node-version: 12
- run: npm install
- run: npm run test
- run: npm run test
27 changes: 27 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
name: Release
on:
workflow_run:
workflows: ['Snyk Security Check']
branches: [master]
types:
- completed
jobs:
release:
name: Release
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v2
with:
node-version: 'lts/*'
- name: Install dependencies
run: npm ci
- name: Release
env:
GITHUB_TOKEN: ${{ secrets.GIT_TOKEN }}
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
run: npx semantic-release
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "rwanda",
"description": "This package provides you access to provinces, districts, sectors, villages and cells found in Rwanda",
"version": "2.1.5",
"version": "2.1.6",
"main": "index.js",
"license": "MIT",
"repository": {
Expand All @@ -15,13 +15,13 @@
"fix-lint": "eslint . --fix"
},
"devDependencies": {
"chai": "^4.3.6",
"chai": "^4.3.7",
"coveralls": "^3.1.1",
"eslint": "^8.13.0",
"eslint": "^8.44.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-import": "^2.27.5",
"eslint-plugin-mocha": "^10.1.0",
"mocha": "^9.2.2",
"mocha": "^10.2.0",
"nyc": "^15.1.0"
},
"keywords": [
Expand Down

0 comments on commit 23a1557

Please sign in to comment.