Skip to content

Commit

Permalink
chore: release workflow, clean NPM package
Browse files Browse the repository at this point in the history
  • Loading branch information
steve-lebleu committed Jan 24, 2024
1 parent 9774686 commit 0c565c2
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 18 deletions.
34 changes: 32 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
run: npm run start & npm run cypress:run
env:
CI: true
release:
release-github:
name: Release on Github
runs-on: ubuntu-latest
needs: [ build, test ]
Expand All @@ -78,4 +78,34 @@ jobs:
- name: Create Github release
uses: konfer-be/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
token: ${{ secrets.GITHUB_TOKEN }}
release-npm:
name: Release on NPM registry
runs-on: ubuntu-latest
needs: [ build, test ]
steps:
- name: Cache dependencies
uses: actions/cache@v2
with:
path: '**/node_modules'
key: node-modules-${{ hashfiles('**/package-lock.json') }}
- name: Github checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup node.js environment
uses: actions/setup-node@v4
with:
node-version: '18.19.0'
registry-url: 'https://registry.npmjs.org'
- name: Create dist directory
run: mkdir -p dist
- name: Download build artifact
uses: actions/download-artifact@v4
with:
name: build-files
path: dist
- name: Release on NPM
run: npm ci & npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.KONFER_NPM_TOKEN }}
11 changes: 7 additions & 4 deletions .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,11 @@
# Node modules, can be retrieved by npm
node_modules

# Must be launched by plato
tests/report

# Retrieved by bower
src/vendors/*
src

# E2E tests
cypress

# Github workflows
.github
16 changes: 4 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@

Self-completion plugin with HTML 5, CSS 3, JavaScript and jQuery > 3.1.1.

Demo here: https://fabrik.konfer.be/kompleter/
Demo: https://fabrik.konfer.be/kompleter/

Github page: https://github.com/steve-lebleu/kompleter

## Installation

Expand Down Expand Up @@ -35,7 +37,7 @@ Retrieve jQuery and Kompleter.js:

Into HTML code, place the following code with your data attributes values:

* **data-url:** path to the data provider, which can be an API endpoint or a JSON file. The returned data format must be JSON.</li>
* **data-url:** path to the data provider, which can be API endpoint or JSON file. Returned data format must be JSON.</li>
* **data-filter-on:** property name of JSON object on which apply filter at keyup.
* **data-fields:** JSON object fields to display, coma separated.

Expand Down Expand Up @@ -64,13 +66,3 @@ Following options are available:
* **afterFocus**: function(e, element), callback fired after focus on result item
* **beforeComplete**: function(e, dataset, element), callback fired before insertion of result
* **afterComplete**: function(e, dataset, element), callback fired after insertion of result

## Todo's

- Security MR
- Code coverage in CI/CD
- Deploy NPM package CI/CD
- Release new version
- Include vanilla version
- Refactoring code jquery
- More E2E

0 comments on commit 0c565c2

Please sign in to comment.