-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (67 loc) · 2.08 KB
/
main.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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
name: Build, test, and deploy
on:
# workflow_dispatch:
# pull_request:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-18.04
steps:
- name: Pushbullet Notification
uses: ShaunLWM/action-pushbullet@master
env:
PB_TOKEN: ${{ secrets.PB_TOKEN }}
PB_TITLE: snapdev-cli
PB_TEXT: "Build job started"
- name: "Checkout"
uses: actions/checkout@v2
with:
fetch-depth: '0'
- name: Pushbullet Notification
uses: ShaunLWM/action-pushbullet@master
env:
PB_TOKEN: ${{ secrets.PB_TOKEN }}
PB_TITLE: snapdev-cli
PB_TEXT: "Installing dependencies"
# Install node dependencies
- name: "Setup Node.js"
uses: actions/setup-node@v1
with:
node-version: '12'
registry-url: https://registry.npmjs.org/
# https://github.com/marketplace/actions/github-action-for-yarn
- uses: borales/actions-yarn@v2.0.0
with:
cmd: install
- name: Pushbullet Notification
uses: ShaunLWM/action-pushbullet@master
env:
PB_TOKEN: ${{ secrets.PB_TOKEN }}
PB_TITLE: snapdev-cli
PB_TEXT: "Tagging the branch"
# tag the branch
- name: Bump version and push tag
id: bump
uses: anothrNick/github-tag-action@1.17.2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
WITH_V: false
DEFAULT_BUMP: patch
- run: npm --no-git-tag-version --allow-same-version version ${{ steps.bump.outputs.tag }}
- name: Pushbullet Notification
uses: ShaunLWM/action-pushbullet@master
env:
PB_TOKEN: ${{ secrets.PB_TOKEN }}
PB_TITLE: snapdev-cli
PB_TEXT: "Publish to NPM"
- run: npm publish
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- name: Pushbullet Notification
uses: ShaunLWM/action-pushbullet@master
env:
PB_TOKEN: ${{ secrets.PB_TOKEN }}
PB_TITLE: snapdev-cli
PB_TEXT: "Build job completed"