-
Notifications
You must be signed in to change notification settings - Fork 61
36 lines (30 loc) · 1.26 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
name: Publish to npm
# Controls when the action will run.
# In this case, I'm saying on each release event when it's specifically a new release publish, the types: [published] is required here,
# since releases could also be updated or deleted, we only want to publish to npm when a new release is created (published).
on:
release:
types: [published, edited]
jobs:
build:
runs-on: ubuntu-latest
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v2
#Install Node.js, with the version 14 and using the registry URL of npm, this could be changed to a custom registry or the GitHub registry.
- uses: actions/setup-node@v1
with:
node-version: 14
registry-url: https://registry.npmjs.org/
# Command to install the package dependencies
- run: yarn install
# Publish to npm
- run: npm publish com.onesignal.unity.core --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm publish com.onesignal.unity.android --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}
- run: npm publish com.onesignal.unity.ios --access public
env:
NODE_AUTH_TOKEN: ${{secrets.NPM_TOKEN}}