Skip to content

GitHub action publish new version #1

GitHub action publish new version

GitHub action publish new version #1

Workflow file for this run

name: GitHub action publish new version
on:
workflow_dispatch:
inputs:
versionType:
type: choice
description: Version Type
required: true
options:
- patch
- minor
- major
permissions:
contents: write
jobs:
publish:
name: Publish github action version
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Use Node.js 20
uses: actions/setup-node@v3
with:
node-version: 20.x
- name: Install npm deps
run: npm ci
- name: Configure git
run: git config --global user.email "y-infra@yandex.ru" && git config --global user.name "y-infra"
- name: Bump version
run: npm version ${{ github.event.inputs.versionType }}
- name: Build github action
run: npm run ci:build
- name: Commit version
run: git add dist -f && git commit --amend --no-edit dist && git push --follow-tags