Skip to content
Permalink
main
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
View runs Go to file
 
 
Cannot retrieve contributors at this time
# This is a basic workflow to help you get started with Actions
name: Release CI
# Controls when the workflow will run
on:
# Triggers the workflow on push or pull request events but only for the "main" branch
# push:
# branches: [ "main" ]
# pull_request:
# branches: [ "main" ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
inputs:
release_version:
required: true
type: string
run-name: "Release CI: version ${{ inputs.release_version }}"
env:
RELEASE_VERSION: ${{ inputs.release_version }}
# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
# This workflow contains a single job called "build"
release-and-update-changelog:
# The type of runner that the job will run on
runs-on: [ self-hosted ]
name: Update the change log and generate a new tag for release
strategy:
matrix:
node-version: [18.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
# Steps represent a sequence of tasks that will be executed as part of the job
steps:
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
- uses: actions/checkout@v3
with:
submodules: true
- uses: actions/setup-node@v3
name: Use Node.js ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}
- uses: pnpm/action-setup@v2
name: Install pnpm
id: pnpm-install
with:
version: 7
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path)" >> $GITHUB_OUTPUT
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ steps.pnpm-cache.outputs.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- uses: oleksiyrudenko/gha-git-credentials@v2-latest
with:
global: true
name: ${{ github.actor }}
email: ${{ github.actor }}@vtb.link
actor: ${{ github.actor }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: update the changelog and add a new tag
if: ${{ env.RELEASE_VERSION == '' }}
run: pnpm release:changelog
- name: update the changelog and add a specific tag
if: ${{ env.RELEASE_VERSION != '' }}
run: pnpm release:changelog --release-as ${{ env.RELEASE_VERSION }}
- name: publish the update
run: git push --follow-tags