forked from rnmapbox/maps
-
Notifications
You must be signed in to change notification settings - Fork 0
29 lines (29 loc) · 938 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
name: Publish to NPM
on:
release:
types: [created]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Read .nvmrc
run: echo ::set-output name=NVMRC::$(cat .nvmrc)
id: nvm
- name: Setup node ${{ steps.nvm.outputs.NVMRC }}
uses: actions/setup-node@v3.5.1
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}
registry-url: https://registry.npmjs.org/
- name: Setup Node
uses: actions/setup-node@v3.5.1
with:
node-version: '14.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies and build 🔧
run: npm install --force
- name: Publish package on NPM 📦
run: npm publish ${{ github.event.release.prerelease && '--tag next' || ''}}
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_PUBLISH_TOKEN_RNMAPBOX }}