Skip to content

Commit

Permalink
Remove dist from source tracking and add actions for linting, buildin…
Browse files Browse the repository at this point in the history
…g and publishing package

fix #2617
  • Loading branch information
NicolasCARPi authored Nov 25, 2021
2 parents 550aa12 + a15443f commit d0b6aac
Show file tree
Hide file tree
Showing 132 changed files with 59 additions and 6,173 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/linting.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: lint
on: [push, pull_request]
jobs:
run-lint:
runs-on: ubuntu-latest
strategy:
matrix:
node: [ '14', '16' ]
name: Node ${{ matrix.node }} test
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node }}
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run lint
run: grunt lint
24 changes: 24 additions & 0 deletions .github/workflows/publishing.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: publish
on:
release:
types: [created]
jobs:
publish:
runs-on: ubuntu-latest
name: Publish latest release
steps:
- uses: actions/checkout@v2
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '16.x'
cache: 'npm'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: npm ci
- name: Build package
run: grunt build
- name: Publish package
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ bower_components

# Dist zip
bootstrap-select-*.zip
dist/

docs/site
5 changes: 4 additions & 1 deletion Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -288,5 +288,8 @@ module.exports = function (grunt) {
grunt.registerTask('dist', ['build', 'compress', 'copy-docs']);

// Default task.
grunt.registerTask('default', ['build-css', 'build-js']);
grunt.registerTask('default', 'build');

// Linting
grunt.registerTask('lint', 'eslint');
};
Loading

0 comments on commit d0b6aac

Please sign in to comment.