-
Notifications
You must be signed in to change notification settings - Fork 17
51 lines (41 loc) · 1.22 KB
/
build-release-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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: Build, Release & Publish
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build-release-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 16
registry-url: https://registry.npmjs.org/
- name: Read package.json
uses: martinbeentjes/npm-get-version-action@master
id: read_package_json
- name: Install deps
run: yarn
- name: Build plugin
run: yarn build
- name: Get changelog entry
id: get_changelog
uses: mindsers/changelog-reader-action@v2
with:
validation_depth: 'version'
version: v${{ steps.read_package_json.outputs.current-version }}
path: ./CHANGELOG.md
- name: Create release
uses: ncipollo/release-action@v1
with:
body: ${{ steps.get_changelog.outputs.changes }}
tag: v${{ steps.read_package_json.outputs.current-version }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Publish on NPM
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}