Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 20 additions & 0 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: 'Setup Node.js with Dependencies'
description: 'Checkout repo, setup Node.js, cache and install dependencies'

runs:
using: 'composite'
steps:
- name: Setup Node.js
uses: actions/setup-node@v6

- name: Cache Dependencies
id: cache
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-${{ hashFiles('yarn.lock') }}

- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
shell: bash
run: yarn install --immutable
91 changes: 0 additions & 91 deletions .github/workflows/auto-assign-by-label.yml

This file was deleted.

186 changes: 0 additions & 186 deletions .github/workflows/auto-milestone.yml

This file was deleted.

18 changes: 18 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: Lint

on:
pull_request:

concurrency:
group: ${{ github.workflow }}-${{ github.head_ref }}
cancel-in-progress: true

jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-node

- name: Run Lint
run: yarn lint:check
74 changes: 74 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Release
on:
workflow_dispatch:
inputs:
noIncrement:
description: "Создать релиз без увеличения версии и публикации в npm"
required: false
default: false
type: boolean
bumpMode:
description: "Режим обновления версии. auto - автоматически на основе списка изменений, major - увеличение мажорной версии, minor - увеличение минорной версии, patch - выпуск патча"
required: false
default: auto
type: choice
options:
- auto
- major
- minor
- patch

jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-node

- name: Test
run: yarn test

lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: ./.github/actions/setup-node

- name: Lint
run: yarn lint:check

release:
runs-on: ubuntu-latest
needs: [test, lint]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- uses: ./.github/actions/setup-node

- name: Configure Git
run: |
git config user.name "${GITHUB_ACTOR}"
git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"

- name: Release with Increment and Publishing
if: inputs.noIncrement == false && inputs.bumpMode == 'auto'
run: yarn release

- name: Release with Increment as ${{ inputs.bumpMode }} and Publishing
if: inputs.noIncrement == false && inputs.bumpMode != 'auto'
run: yarn release ${{ inputs.bumpMode }}

- name: Release Without Increment and Publishing
if: inputs.noIncrement == true
run: yarn release --no-increment --no-npm.publish

- name: Send Notification
run: |
PACKAGE_NAME=$(jq -r ".name" package.json)
PACKAGE_VERSION=$(jq -r ".version" package.json)
REPO_URL="${{ github.server_url }}/${{ github.repository }}"
MESSAGE="Выпущена новая версия [${PACKAGE_NAME}](${REPO_URL})\n[v${PACKAGE_VERSION}](${REPO_URL}/releases/tag/v${PACKAGE_VERSION})"
curl -X POST -H "Content-Type: application/json" -d "{\"text\": \"$MESSAGE\"}" "${{ secrets.BUILD_CHAT_WEBHOOK }}"
Loading
Loading