bump version for release #538
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 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/[email protected] | |
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 |