Skip to content
Merged
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
23 changes: 23 additions & 0 deletions .github/actions/setup-node/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: 'Setup Node.js with Dependencies'
description: 'Checkout repo, setup Node.js, cache and install dependencies'

runs:
using: 'composite'
steps:
- name: Checkout Repo
uses: actions/checkout@v6

- 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
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
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:
- name: Setup Node.js with Dependencies
uses: ./.github/actions/setup-node

- name: Test
run: yarn test

lint:
runs-on: ubuntu-latest
steps:
- name: Setup Node.js with Dependencies
uses: ./.github/actions/setup-node

- name: Lint
run: yarn lint:check

release:
runs-on: ubuntu-latest
steps:
- name: Setup Node.js with Dependencies
uses: ./.github/actions/setup-node

- name: Release Test Step
run: echo ${{ inputs.noIncrement }} - ${{ inputs.bumpMode }}
31 changes: 31 additions & 0 deletions .release-it.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{
"$schema": "https://unpkg.com/release-it@19/schema/release-it.json",
"git": { "commitMessage": "chore: release v${version}" },
"github": { "release": true },
"npm": { "publish": false },
"hooks": {
"before:bump": "yarn expo prebuild --no-install",
"after:bump": "yarn build"
},
"plugins": {
"@release-it/conventional-changelog": {
"preset": {
"name": "conventionalcommits",
"types": [
{ "type": "feat", "section": "Новый функционал" },
{ "type": "fix", "section": "Исправления багов" },
{ "type": "chore", "section": "Другое" },
{ "type": "docs", "section": "Другое" },
{ "type": "style", "section": "Другое" },
{ "type": "refactor", "section": "Рефакторинг" },
{ "type": "perf", "section": "Другое" },
{ "type": "test", "section": "Другое" },
{ "type": "build", "section": "Другое" },
{ "type": "ci", "section": "Другое", "hidden": false },
{ "type": "revert", "section": "Другое" }
]
},
"infile": "CHANGELOG.md"
}
}
}
10 changes: 8 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,8 @@
"lint:fix": "eslint --fix .",
"prettier:check": "prettier . --check",
"prettier:fix": "prettier . --write",
"prettier:watch": "onchange . -- prettier --write --ignore-unknown \"{{changed}}\""
"prettier:watch": "onchange . -- prettier --write --ignore-unknown \"{{changed}}\"",
"release": "release-it"
},
"devDependencies": {
"@babel/core": "7.28.3",
Expand All @@ -50,6 +51,7 @@
"@react-native-async-storage/async-storage": "2.1.2",
"@react-native-community/datetimepicker": "8.4.1",
"@react-native-community/slider": "4.5.6",
"@release-it/conventional-changelog": "10.0.1",
"@storybook/addon-actions": "8.3.5",
"@storybook/addon-controls": "8.3.5",
"@storybook/addon-ondevice-actions": "8.3.5",
Expand Down Expand Up @@ -105,6 +107,7 @@
"react-native-reanimated": "3.19.1",
"react-native-safe-area-context": "5.6.1",
"react-native-svg": "15.12.1",
"release-it": "19.0.6",
"standard-version": "9.5.0",
"storybook": "8.3.5",
"ts-node": "10.9.2",
Expand All @@ -126,6 +129,9 @@
"optional": true
}
},
"resolutions": {
"conventional-changelog-conventionalcommits": "8.0.0"
},
"packageManager": "yarn@4.6.0",
"engines": {
"node": "20"
Expand Down Expand Up @@ -155,4 +161,4 @@
}
}
}
}
}
Loading
Loading