Skip to content

Commit

Permalink
try automated releases on push to main🤞
Browse files Browse the repository at this point in the history
  • Loading branch information
xddq committed Jun 6, 2024
1 parent 5cbafcd commit 3fec8db
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 2 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/publish.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# src: https://github.com/JS-DevTools/npm-publish
on:
push:
branches: main

jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- name: Install Dependencies
run: yarn --immutable
- name: Compile
run: yarn compile
- uses: JS-DevTools/npm-publish@v3
with:
token: ${{ secrets.NPM_TOKEN }}
3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,7 @@
"lint": "eslint . --fix",
"lint:check": "eslint .",
"start": "node --enable-source-maps ./dist/src/index.js",
"test": "jest --runInBand .",
"release": "rm -r dist && yarn compile && npm publish"
"test": "jest --runInBand ."
},
"repository": {
"type": "git",
Expand Down

0 comments on commit 3fec8db

Please sign in to comment.