feat(*): fix types deploy_beta #131
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: Post push check | |
on: | |
push | |
jobs: | |
check: | |
runs-on: ubuntu-latest | |
steps: | |
# Переключение на выбранную при запуске action ветку и скачивание файлов в окружение. | |
- name: Checkout | |
uses: actions/checkout@v3 | |
# Установка зависимостей. | |
- name: Install dependencies | |
run: yarn | |
# Прогон тестов | |
- name: Run tests | |
run: yarn test | |
# Выпуск beta версии библиотеки, если в commit message есть вхождение строки "deploy_beta" | |
- name: Publish beta version | |
if: "contains(github.event.head_commit.message, 'deploy_beta')" | |
run: | | |
CURRENT_VERSION=$(grep -o '"version": "[^"]*' package.json | awk -F'"' '{print $4}') | |
export TAG="beta" | |
export VERSION="$CURRENT_VERSION-beta-$(git rev-parse --short HEAD)" | |
echo "//registry.npmjs.org/:_authToken=$TOKEN" > .npmrc | |
yarn release | |
echo "### Выпущена новая версия библиотеки: $VERSION" >> $GITHUB_STEP_SUMMARY | |
env: | |
TOKEN: ${{ secrets.NPM_TOKEN }} | |