-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (39 loc) · 1008 Bytes
/
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
name: Publish
on:
push:
tags:
- '*.*.*'
jobs:
publish:
runs-on: ubuntu-latest
steps:
- name: Checkout repo
uses: actions/checkout@v2
- name: Use Node 16
uses: actions/setup-node@v3
with:
node-version: 16
- run: npm install
- name: Build
run: npm run build
- name: Test
run: npm test
- id: publish
name: Publish to NPM
uses: JS-DevTools/npm-publish@v1
with:
token: ${{ secrets.NPM_TOKEN }}
access: public
- name: Build IIFE
run: npm run build-iife
- name: Release
uses: softprops/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
name: Version ${{ steps.publish.outputs.version }}
draft: false
prerelease: ${{ contains(steps.publish.outputs.version, '-') }}
files: |
dist/sp.js