Release 2.32.0 by baev #33
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
run-name: Release ${{ inputs.releaseVersion }} by ${{ github.actor }} | |
on: | |
workflow_dispatch: | |
inputs: | |
releaseVersion: | |
description: "The release version in <MAJOR>.<MINOR>.<PATCH> format" | |
required: true | |
jobs: | |
triage: | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Check release version" | |
run: | | |
expr "${{ github.event.inputs.releaseVersion }}" : '\(^[1-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-beta\.[1-9][0-9]*\)\{0,1\}\)$' | |
- uses: actions/checkout@v4 | |
with: | |
token: ${{ secrets.QAMETA_CI }} | |
- name: "Configure CI Git User" | |
run: | | |
git config --global user.name qameta-ci | |
git config --global user.email [email protected] | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 14 | |
- name: "Set release version" | |
run: | | |
npx replace-in-file --isRegex=true '/"version":\s*".+"/g' '"version": "${{ github.event.inputs.releaseVersion }}"' 'package.json' | |
- name: "Commit release version and create tag" | |
run: | | |
git add -A | |
git commit -am "release ${{ github.event.inputs.releaseVersion }}" | |
git tag v${{ github.event.inputs.releaseVersion }} | |
git push origin v${{ github.event.inputs.releaseVersion }} | |
git push origin ${GITHUB_REF} | |
- name: "Publish Github Release" | |
uses: octokit/[email protected] | |
with: | |
route: POST /repos/${{ github.repository }}/releases | |
tag_name: ${{ github.event.inputs.releaseVersion }} | |
generate_release_notes: true | |
target_commitish: ${{ github.ref }} | |
env: | |
GITHUB_TOKEN: ${{ secrets.QAMETA_CI }} |