Skip to content

Commit

Permalink
Adds NPM release pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Titou325 committed May 30, 2024
1 parent 7795c37 commit 2949f56
Show file tree
Hide file tree
Showing 2 changed files with 55 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: NPM Package

on:
push:
branches:
- main

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [18, 20]

name: Node ${{ matrix.node }}
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node }}

- name: Install dependencies
run: npm install

- name: Run tests
run: npm test

publish:
runs-on: ubuntu-latest
needs: test
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20

- name: Install dependencies
run: npm ci

- name: Build package
run: npm run build --workspace=@fileforge/client

- name: Publish package
run: npm publish
working-directory: packages/typescript
4 changes: 4 additions & 0 deletions packages/typescript/.npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
src
node_modules
dist
tsconfig.json

0 comments on commit 2949f56

Please sign in to comment.