Merge pull request #264 from ringcentral/RCLABS-854 #1
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: Release Package | |
on: | |
push: | |
tags: | |
- '*' | |
jobs: | |
Test: | |
runs-on: ubuntu-latest # Firefox in it | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: 'https://registry.npmjs.org' | |
- run: npm install | |
- run: DEBUG=eslint:cli-engine npm run lint:all | |
- run: npm run build | |
- run: npm run test:browser | |
- run: npm run test:coverage | |
Release: | |
needs: Test | |
runs-on: ubuntu-latest # Firefox in it | |
strategy: | |
matrix: | |
node-version: [16.x] | |
permissions: | |
contents: write # for release | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
registry-url: 'https://registry.npmjs.org' | |
- run: npm install | |
- run: npm run build | |
- run: git status && git stash | |
- run: echo "TAG=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV | |
- run: npm run publish:release -- $TAG --yes | |
if: ${{ env.TAG != '' && !contains(env.TAG, '/') && github.repository == 'ringcentral/ringcentral-js' }} | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} | |
- name: Release | |
if: ${{ env.TAG != '' && !contains(env.TAG, '/') && github.repository == 'ringcentral/ringcentral-js' }} | |
uses: softprops/action-gh-release@v1 | |
with: | |
files: | | |
sdk/dist/ringcentral.js | |
sdk/dist/ringcentral.js.map | |
sdk/dist/ringcentral.min.js | |
sdk/dist/ringcentral.min.js.map | |
subscriptions/dist/ringcentral-subscriptions.js | |
subscriptions/dist/ringcentral-subscriptions.js.map | |
subscriptions/dist/ringcentral-subscriptions.min.js | |
subscriptions/dist/ringcentral-subscriptions.min.js.map | |
subscriptions-deprecated/dist/ringcentral-subscriptions-deprecated.js | |
subscriptions-deprecated/dist/ringcentral-subscriptions-deprecated.js.map | |
subscriptions-deprecated/dist/ringcentral-subscriptions-deprecated.min.js | |
subscriptions-deprecated/dist/ringcentral-subscriptions-deprecated.min.js.map | |
env: | |
GITHUB_REPOSITORY: ringcentral/ringcentral-js | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |