-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (43 loc) · 1.04 KB
/
push.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
name: 'Push'
on:
push:
branches:
- 'main'
jobs:
unit-test:
name: 'Build and test'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: |
npm ci
npm run build
npm run test
bump-version:
name: 'Version bump'
runs-on: ubuntu-latest
needs: [unit-test]
permissions:
contents: write
steps:
- name: 'Checkout source code'
uses: 'actions/checkout@v2'
with:
ref: ${{ github.ref }}
- name: 'cat package.json'
run: cat ./package.json
- name: 'Version bump'
uses: 'phips28/gh-action-bump-version@master'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
commit-message: 'ci: bump version to {{version}} [skip ci]'
trigger-deploy-webhook:
name: 'Trigger deploy'
runs-on: ubuntu-latest
needs: [bump-version]
steps:
- name: Webhook
uses: distributhor/workflow-webhook@v3
env:
webhook_url: ${{ secrets.RENDER_DEPLOY_WEBHOOK }}