Skip to content

Publish @vkontakte/vk-bridge patch #92

Publish @vkontakte/vk-bridge patch

Publish @vkontakte/vk-bridge patch #92

Workflow file for this run

name: 'Publish'
on:
workflow_dispatch:
inputs:
package_name:
description: "package's name:"
type: choice
options:
- '@vkontakte/vk-bridge'
- '@vkontakte/vk-bridge-react'
required: true
new_version:
description: 'version type:'
type: choice
default: 'minor'
options:
- patch
- minor
- major
required: true
run-name: Publish ${{ github.event.inputs.package_name }} ${{ inputs.new_version }}
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
id-token: write
steps:
- name: Checkout
uses: actions/checkout@v6
with:
token: ${{ secrets.DEVTOOLS_GITHUB_TOKEN }}
- name: Setting up the repository environment
uses: ./.github/actions/publish-workflow-1-setup
- name: Bump version
id: updated_versions_info
uses: ./.github/actions/publish-workflow-2-bump-version
with:
package_name: ${{ github.event.inputs.package_name }}
new_version: ${{ github.event.inputs.new_version }}
- name: Run pre-publish checks
uses: ./.github/actions/publish-workflow-3-validation
- name: Update npm
run: npm install -g npm@latest
shell: bash
- name: Pack package
run: yarn workspace ${{ github.event.inputs.package_name }} pack --out ../../artifact.tgz
shell: bash
- name: Publish release
run: npm publish artifact.tgz --access public
shell: bash
- name: Commit and tag
run: |
git add -A
git commit -m "bump(${{ github.event.inputs.package_name }}): from ${{ steps.updated_versions_info.outputs.prev_version }} to ${{ steps.updated_versions_info.outputs.next_version }}"
git tag ${{ github.event.inputs.package_name }}@${{ steps.updated_versions_info.outputs.next_version }}
shell: bash
- name: Pushing changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.DEVTOOLS_GITHUB_TOKEN }}
branch: ${{ github.ref }}
tags: true