Skip to content

Commit 62b4343

Browse files
committed
chore: add npm-publish.yml github-actio, [skip-ci]
1 parent 2ab6d5c commit 62b4343

File tree

2 files changed

+48
-0
lines changed

2 files changed

+48
-0
lines changed

Diff for: .github/workflows/npm-publish.yml

+37
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
name: Publish Package to npmjs
2+
3+
on:
4+
release:
5+
types: [published]
6+
7+
jobs:
8+
publish:
9+
runs-on: ubuntu-latest
10+
11+
steps:
12+
- name: Check out the repository
13+
uses: actions/checkout@v2
14+
15+
- name: Set up Node.js
16+
uses: actions/setup-node@v2
17+
with:
18+
node-version: '18'
19+
20+
- name: Install dependencies
21+
run: yarn install
22+
23+
- name: Publish to npm
24+
run: npm publish
25+
env:
26+
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
27+
28+
- name: Notification
29+
if: always()
30+
id: slack
31+
uses: wingify/[email protected]
32+
with:
33+
channel-id: 'vwo-fs-fme-sdk-job-status'
34+
slack-message: "<!here> VWO FME Node.js SDK tag ${{ github.event.release.tag_name }} published to npmjs ${{job.status == 'success' && ':heavy_check_mark:' || ':x:'}}. Check it out at https://www.npmjs.com/package/wingify/vwo-fme-node-sdk"
35+
color: "${{job.status == 'success' && '#00FF00' || '#FF0000'}}"
36+
env:
37+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}

Diff for: .github/workflows/typedoc.yml

+11
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,14 @@ jobs:
2828
uses: JamesIves/github-pages-deploy-action@v4
2929
with:
3030
folder: docs
31+
32+
- name: Notification
33+
if: always()
34+
id: slack
35+
uses: wingify/[email protected]
36+
with:
37+
channel-id: 'vwo-fs-fme-sdk-job-status'
38+
slack-message: "<!here> Node.js FME SDK documentation has been updated. Check it out at https://wingify.github.io/vwo-fme-node-sdk"
39+
color: "${{job.status == 'success' && '#00FF00' || '#FF0000'}}"
40+
env:
41+
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}

0 commit comments

Comments
 (0)