Skip to content

Release 2.31.0 by baev #32

Release 2.31.0 by baev

Release 2.31.0 by baev #32

Workflow file for this run

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 }}