forked from vanillawc/wc-codemirror
-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (48 loc) · 1.22 KB
/
release.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
name: Release
on:
push:
tags:
- 'v*'
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Setup
uses: actions/setup-node@v1
with:
node-version: 14
- name: Cache
uses: actions/cache@v1
with:
path: node_modules
key: ${{ runner.OS }}-npm-cache-${{ hashFiles('**/package.json') }}
restore-keys: |
${{ runner.OS }}-npm-cache-
- name: Verify
run: |
npm i
npm run preversion
npm:
runs-on: ubuntu-latest
needs: check
steps:
- name: Checkout
uses: actions/checkout@master
- name: Publish
run: |
echo "//registry.npmjs.org/:_authToken=${{ secrets.NPM_AUTH_TOKEN }}" > ~/.npmrc
npm publish --access public
gh:
runs-on: ubuntu-latest
needs: check
steps:
- name: Checkout
uses: actions/checkout@master
- name: Publish
run: |
echo "//npm.pkg.github.com/:_authToken=${{ secrets.GITHUB_TOKEN }}" >> ~/.npmrc
ORG="$(echo '${{ github.repository }}' | cut -d'/' -f1)"
echo "registry=https://npm.pkg.github.com/$ORG" > .npmrc
npm publish