Handle invalid device code registration. #39
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
on: | |
push: | |
branches: | |
- main | |
- 'release/**' | |
pull_request: | |
branches: | |
- main | |
- 'release/**' | |
jobs: | |
nodejs: | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 16 | |
registry-url: 'https://registry.npmjs.org' | |
- name: Install packages | |
run: yarn --frozen-lockfile | |
- name: Run Setup | |
run: node make.js setup | |
- name: Run build | |
run: yarn build | |
- name: Deploy to NPM | |
if: github.ref != 'refs/heads/main' && github.event_name == 'push' | |
run: npm publish --access public | |
env: | |
NODE_AUTH_TOKEN: ${{ secrets.NODE_AUTH_TOKEN }} | |
- name: After build | |
if: github.ref != 'refs/heads/main' && github.event_name == 'push' | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: node make.js after_build | |
- name: Create Github Release and Tag | |
if: github.ref != 'refs/heads/main' && github.ref != 'refs/heads/master' && github.event_name == 'push' | |
run: | | |
git tag ${GITHUB_REF/refs\/heads\/release\//}.$GITHUB_RUN_NUMBER | |
git push origin ${GITHUB_REF/refs\/heads\/release\//}.$GITHUB_RUN_NUMBER |