Files
trezor-suite/.github/workflows/release-connect-bump-versions.yml

63 lines
1.9 KiB
YAML

name: "[Release] connect bump versions"
on:
workflow_dispatch:
inputs:
semver:
type: choice
description: semver
options:
- patch
- prepatch
- minor
- preminor
- prerelease
concurrency:
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
cancel-in-progress: true
jobs:
bump-versions:
runs-on: ubuntu-latest
steps:
- name: Generate GitHub App token
id: trezor-bot-token
uses: actions/create-github-app-token@v1
with:
app-id: ${{ secrets.TREZOR_BOT_APP_ID }}
private-key: ${{ secrets.TREZOR_BOT_PRIVATE_KEY }}
- name: Checkout
uses: actions/checkout@v4
with:
token: ${{ steps.trezor-bot-token.outputs.token }}
# Fetch all commit history because Script connect-bump-versions.ts needs them to produce CHANGELOG for packages.
fetch-depth: 0
# `ref` makes sure that we checkout the branch we are running workflow on.
ref: ${{ github.head_ref }}
# `submodules` are required to run `yarn build:libs`.
submodules: true
- name: Setup node
uses: actions/setup-node@v4
with:
node-version-file: ".nvmrc"
- name: Install dependencies
run: yarn install
# The script connect-bump-versions.ts needs to build packages so dependencies are required.
- name: Build dependencies
run: yarn build:libs
- name: Setup Git config
run: |
git config --global user.name "trezor-ci"
git config --global user.email "${{ secrets.TREZOR_BOT_EMAIL }}"
- name: Check dependencies to update
env:
GITHUB_TOKEN: ${{ steps.trezor-bot-token.outputs.token }}
run: |
yarn tsx ./scripts/ci/connect-bump-versions.ts ${{ github.event.inputs.semver }}