Skip to content

Commit

Permalink
add github action to publish releases
Browse files Browse the repository at this point in the history
  • Loading branch information
Amin Rostami committed Oct 5, 2022
1 parent 966ed81 commit 01af475
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 1 deletion.
21 changes: 21 additions & 0 deletions .github/workflows/publish.yml
@@ -0,0 +1,21 @@
name: Publish to NPM
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node
uses: actions/setup-node@v2
with:
node-version: '16.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies and build 🔧
run: npm install
- name: Publish package on NPM 📦
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -2,7 +2,7 @@
"name": "sharing",
"version": "1.0.0",
"description": "Sharing is a command-line tool to share directory and files with ios and android devices without an extra client app",
"main": "index.js",
"main": "bin/index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1"
},
Expand Down

0 comments on commit 01af475

Please sign in to comment.