5.1.0 Release #69
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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}} |