Skip to content

Publish minor

Publish minor #3

Workflow file for this run

name: 'Publish'
on:
workflow_dispatch:
inputs:
type:
description: "version type:"
required: true
type: choice
default: "minor"
options:
- patch
- minor
- major
custom_version:
description: 'custom version: x.y.z (without "v")'
required: false
run-name: Publish ${{ inputs.type }} ${{ inputs.custom_version }}
jobs:
publish:
runs-on: ubuntu-latest
steps:
- uses: actions/[email protected]
with:
token: ${{ secrets.DEVTOOLS_GITHUB_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
always-auth: true
registry-url: 'https://registry.npmjs.org'
- run: yarn install --frozen-lockfile --ignore-scripts
- name: Set Git credentials
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
- name: Bump by version type
if: ${{ !github.event.inputs.custom_version }}
run: yarn version --${{ github.event.inputs.type }} --no-commit-hooks
- name: Bump by custom version
if: ${{ github.event.inputs.custom_version }}
run: yarn version --new-version ${{ github.event.inputs.custom_version }} --no-commit-hooks
- name: Pushing changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.DEVTOOLS_GITHUB_TOKEN }}
branch: ${{ github.ref }}
- name: Publushing release
run: yarn publish --access public --non-interactive
env:
NODE_AUTH_TOKEN: ${{ secrets.NPMJS_PUBLISH_TOKEN }}