add CodeField className #152 #27
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: Version | |
on: | |
workflow_dispatch: | |
inputs: | |
release_type: | |
description: 'Release type' | |
type: choice | |
default: 'patch' | |
options: | |
- 'patch' | |
- 'minor' | |
- 'major' | |
push: | |
branches: | |
- master | |
paths: | |
- "src/**" | |
- "!src/**/*.stories.mdx" | |
jobs: | |
build: | |
name: Version | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
fetch-depth: 0 | |
token: ${{ secrets.PUSH_TOKEN }} | |
- name: Set git user | |
run: | | |
git config --global user.name 'github-actions[bot]' | |
git config --global user.email 'bot@nil.foundation' | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Update version | |
run: | | |
npm version ${{ inputs.release_type || 'patch' }} | |
- name: Push changes | |
uses: ad-m/github-push-action@master | |
with: | |
github_token: ${{ secrets.PUSH_TOKEN }} | |
branch: master | |
tags: true |