Skip to content

⚠️ Release

⚠️ Release #155

Workflow file for this run

name: ⚠️ Release
on:
workflow_dispatch:
mode:
type: choice
description: release mode
required: true
options:
- patch
- minor
- major
- prerelease
jobs:
run-release:
name: Run release
runs-on: ubuntu-latest
if: "!contains(github.event.head_commit.message, 'chore(release)')"
env:
GITHUB_TOKEN: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}
steps:
- uses: taiga-family/ci/actions/setup/[email protected]
with:
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}
ref: ${{ github.ref }}
fetch-depth: 0
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/setup/[email protected]
- uses: taiga-family/ci/actions/setup/config/[email protected]
with:
token: ${{ secrets.TAIGA_FAMILY_BOT_PAT }}
- uses: taiga-family/ci/actions/setup/config/[email protected]
with:
token: ${{ secrets.TAIGA_UI_SCOPE_NPM_TOKEN }}
- run: git pull --rebase --recurse-submodules
- run: npx ts-node .scripts/validate-version.ts
- run: |
if [[ "${{ github.event.inputs.mode }}" != "prerelease" ]]; then
npx release-it "${{ github.event.inputs.mode }}" --increment --ci --github.release
else
npx release-it --preRelease=alpha --ci
fi
- id: info
run: |
echo "version=v$(node -p "require('./dist/editor/package.json').version")" >> $GITHUB_OUTPUT
echo "name=$(node -p "require('./dist/editor/package.json').name")" >> $GITHUB_OUTPUT
- name: Announce to Telegram
if: ${{ !contains(steps.info.outputs.version, 'rc') }}
uses: taiga-family/ci/actions/messenger/telegram/[email protected]
with:
chatId: ${{ secrets.TAIGA_TELEGRAM_CHAT_ID }}
topicId: ${{ secrets.TAIGA_TELEGRAM_CHAT_THREAD_ID }}
token: ${{ secrets.TAIGA_TELEGRAM_BOT_TOKEN }}
version: ${{ steps.info.outputs.version }}
textLink: ${{ steps.info.outputs.name }}