Skip to content

Commit cdfc4a5

Browse files
author
Manthan Ankolekar
committed
feat: added publish
1 parent 747d888 commit cdfc4a5

File tree

2 files changed

+34
-5
lines changed

2 files changed

+34
-5
lines changed

.github/workflows/publish.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: NPM Package
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
build:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v3
12+
- uses: actions/setup-node@v3
13+
with:
14+
node-version: 16
15+
- run: npm ci
16+
17+
publish-npm:
18+
needs: build
19+
runs-on: ubuntu-latest
20+
steps:
21+
- uses: actions/checkout@v3
22+
- uses: actions/setup-node@v3
23+
with:
24+
node-version: 16
25+
registry-url: https://registry.npmjs.org/
26+
- run: npm ci
27+
- run: npm publish
28+
env:
29+
NODE_AUTH_TOKEN: ${{secrets.NPM_AUTH_TOKEN}}

.github/workflows/releases.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ jobs:
99
runs-on: ubuntu-latest
1010

1111
steps:
12-
- uses: actions/checkout@v2
12+
- uses: actions/checkout@v3
1313

1414
- name: conventional Changelog Action
1515
id: changelog
16-
uses: TriPSs/conventional-changelog-action@v3.7.1
16+
uses: TriPSs/conventional-changelog-action@v3
1717
with:
18-
github-token: ${{ secrets.PA_TOKEN }}
19-
version-file: './releases.json'
18+
github-token: ${{ secrets.PA_TOKEN}}
19+
version-file: './package.json,./package-lock.json'
2020

2121
- name: create release
2222
uses: actions/create-release@v1
@@ -26,4 +26,4 @@ jobs:
2626
with:
2727
tag_name: ${{ steps.changelog.outputs.tag }}
2828
release_name: ${{ steps.changelog.outputs.tag }}
29-
body: ${{ steps.changelog.outputs.clean_changelog }}
29+
body: ${{ steps.changelog.outputs.clean_changelog }}

0 commit comments

Comments
 (0)