Skip to content

Release

Release #26

Workflow file for this run

name: Release
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/[email protected]
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@v2
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 }}