Skip to content

Publish

Publish #1

Workflow file for this run

name: Publish
on:
workflow_dispatch:
inputs:
version:
description: 'Введите версию x.x.x'
required: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Check permissions
if: ${{ contains(fromJSON('["reme3d2y","Valeri8888","SiebenSieben","fulcanellee"]'), github.actor) == false }}
uses: actions/github-script@v6
with:
script: |
core.setFailed("you don't have permission to run this workflow!");
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: '20.x'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: yarn --pure-lockfile
- name: Build app
run: yarn build
- name: Set version
if: success()
run: |
git config user.name core-ds-bot
git config user.email [email protected]
yarn --new-version version ${{ github.event.inputs.version }}
git push
- name: Publish
if: success()
run: npm publish
env:
NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
- name: Push tag
if: success()
run: git push origin --tags