-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (30 loc) · 1.02 KB
/
npm-publish.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Publish Package to npmjs
on:
release:
types: [published]
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Check out the repository
uses: actions/checkout@v2
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '18'
- name: Install dependencies
run: yarn install
- name: Publish to npm
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Notification
if: always()
id: slack
uses: wingify/slack-github-action@v1.15.1-wingify
with:
channel-id: 'vwo-fs-fme-sdk-job-status'
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"
color: "${{job.status == 'success' && '#00FF00' || '#FF0000'}}"
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_NOTIFICATIONS_BOT_TOKEN }}