Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
islemci committed Oct 1, 2024
2 parents 3e6f099 + c710794 commit 24ac4b0
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 4 deletions.
11 changes: 8 additions & 3 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Function tests with Jest
name: Tests

on:
push:
Expand All @@ -20,5 +20,10 @@ jobs:
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: npm run build
- run: npm test

- name: Install package.json dependencies with npm
run: npm install

- name: Test with Jest
run: npm run test

30 changes: 30 additions & 0 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Publish to npm

on:
workflow_run:
workflows: ["Tests"] # Update this to match the new workflow name
types:
- completed

jobs:
publish:
if: ${{ github.event.workflow_run.conclusion == 'success' }}
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '20'
registry-url: 'https://registry.npmjs.org/'

- name: Install dependencies
run: npm install

- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
3 changes: 2 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,5 @@ coverage/
.DS_Store
Thumbs.db
.vscode/
.idea/
.idea/
.github/

0 comments on commit 24ac4b0

Please sign in to comment.