Skip to content

Fix #1215 (#1224)

Fix #1215 (#1224) #526

Workflow file for this run

name: Release Device Farm to NPM
on:
push:
branches:
- main
tags:
- '*.*.*'
pull_request:
types:
- labeled
jobs:
release:
if: github.event.action != 'labeled'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
token: ${{ secrets.PAT_TOKEN }}
# Get tag name.
- id: tag
uses: haya14busa/action-cond@v1
with:
cond: "${{ startsWith(github.ref, 'refs/tags/') }}"
if_true: ${{ github.ref }}
if_false: ${{ steps.bumpr.outputs.next_version }}
- name: Release
uses: justincy/github-action-npm-release@2.0.2
id: release
- uses: actions/setup-node@v3
if: steps.release.outputs.released == 'true'
with:
registry-url: 'https://registry.npmjs.org'
node-version: 16
- name: Publish
if: steps.release.outputs.released == 'true'
run: echo "//registry.npmjs.org/:_authToken=${{secrets.npm_token}}" > .npmrc && npm ci && npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.npm_token }}
release-check:
if: github.event.action == 'labeled'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Post bumpr status comment
uses: haya14busa/action-bumpr@v1