Skip to content

Commit

Permalink
ci: GitHub workflow updates
Browse files Browse the repository at this point in the history
- Tested using `act` but could use more testing
  • Loading branch information
shanmukhateja committed Apr 9, 2024
1 parent 8c7fa7c commit 05566d5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 13 deletions.
14 changes: 3 additions & 11 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,12 @@ jobs:
run: npm install

- name: Run build
run: npm run build

- name: Pack library
run: npm pack

# test demo
- name: Install demo dependencies
working-directory: ./demo
run: npm install
run: npm run build:lib

- name: Install current angular-datatables to demo
working-directory: ./demo
run: rm -rf node_modules/angular-datatables && npm install --no-save --no-package-lock ../angular-datatables-*.tgz
run: npm run link:lib

- name: Run demo test
working-directory: ./demo
run: npm run test-ci
run: npm run demo:test-ci
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ jobs:
run: npm install

- name: Run build
run: npm run build
run: npm run build:lib

- name: Publish to NPM packages
# includes a --ignore-scripts command argument to avoid executing npm life cycle scripts during this phase
# for security concerns as scripts could steal NODE_AUTH_TOKEN
run: npm publish --ignore-scripts --access public
run: cd lib && npm publish --ignore-scripts --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}

0 comments on commit 05566d5

Please sign in to comment.