Skip to content

Commit

Permalink
Use a github action workflow to release new versions (#612)
Browse files Browse the repository at this point in the history
* add workflow

* add npmignore

* use setup-node v4 and node v20

* handle commit message

* add package-lock

* publish on new release

* update name

* add public access

* remove package-lock
  • Loading branch information
QuentinLemCode committed Nov 18, 2023
1 parent af72f55 commit d4f354b
Show file tree
Hide file tree
Showing 2 changed files with 65 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Publish on NPM on release

on:
release:
types: [published]

jobs:
build:
runs-on: ubuntu-latest

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

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

- name: Install dependencies
run: npm install

- name: Build
run: npm run build

- name: Test
run: npm test

- name: Publish to NPM
run: npm publish --access=public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_AUTH_TOKEN }}
33 changes: 33 additions & 0 deletions .npmignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# dependencies
node_modules

# dev tools
.idea
*.iml
out
.vscode
.eslintcache
yarn.lock
.github
.editorconfig
.eslintignore
.eslintrc.js
.gitignore
.nvmrc
.prettierignore
.prettierrc
CODE_OF_CONDUCT.md
codecov.yml
CONTRIBUTING.md
tsconfig.build.json
tsconfig.json
vite.config.ts

# tests
coverage
.nyc_output

# source files
src
examples
test

0 comments on commit d4f354b

Please sign in to comment.