Skip to content

Commit

Permalink
👷 Added ghaction for automatic publishing on npm when pushing on master
Browse files Browse the repository at this point in the history
  • Loading branch information
giosuetrap2002 committed Jun 25, 2023
1 parent cf1a96e commit 65ab26c
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: Publish revo-cli to npm
on:
push:
branches:
- master

jobs:
publish:
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

- name: Log in to npm
run: echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_TOKEN }}" > ~/.npmrc

- name: Install dependencies
run: npm ci

- name: Publish to npm
run: npm publish --access public
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@revodigital/revo-cli",
"version": "0.0.1",
"version": "0.0.2",
"main": "index.ts",
"bin": {
"revo": "./dist/index.js"
Expand Down

0 comments on commit 65ab26c

Please sign in to comment.