-
Notifications
You must be signed in to change notification settings - Fork 1
51 lines (40 loc) · 1.03 KB
/
publish-to-npm.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: Publish Plugin To NPM
on:
push:
tags:
- '*'
permissions:
contents: write
jobs:
build_and_publish:
runs-on: ubuntu-latest
name: Build and publish package
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Set Node 18.x
uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org'
scope: '@dylmye'
cache: yarn
- name: Install dependencies
run: yarn --frozen-lockfile
- name: Build package
run: yarn build plugin
- name: Publish to NPM
run: yarn publish --access public
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
create_release:
runs-on: ubuntu-latest
name: Create GitHub release
needs: build_and_publish
steps:
- name: Check out code
uses: actions/checkout@v4
- name: Create release
uses: softprops/action-gh-release@v2
with:
generate_release_notes: true