Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
70 changes: 70 additions & 0 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
name: Release
run-name: Release ${{ inputs.releaseVersion }} by ${{ github.actor }}

on:
workflow_dispatch:
inputs:
releaseVersion:
description: 'Release version (e.g., v1.0.0)'
required: true
type: string
majorReleaseVersion:
description: 'Related major release version (e.g., v1)'
required: true
type: choice
options:
- v1

permissions:
contents: read

jobs:
build:
runs-on: ubuntu-latest
name: Build and Release
steps:
- name: 'Check release version'
run: |
expr "${{ github.event.inputs.releaseVersion }}" : '^v\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\(-beta\.[0-9][0-9]*\)\{0,1\}\)$'

- uses: actions/checkout@v6
with:
ref: main
token: ${{ secrets.QAMETA_CI }}

- name: 'Configure CI Git User'
run: |
git config --global user.name qameta-ci
git config --global user.email qameta-ci@qameta.io

- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm
- run: npm ci
- run: npm run build
- run: npm run lint

- name: 'Commit release version and create tag'
run: |
git add -A
git commit --allow-empty -m "release ${{ github.event.inputs.releaseVersion }}" --no-verify
git tag ${{ github.event.inputs.releaseVersion }}
git push origin HEAD:main
git push origin ${{ github.event.inputs.releaseVersion }}

- name: 'Publish Github Release'
uses: octokit/request-action@v2.x
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 }}

- name: Tag new target
run: git tag -f ${{ github.event.inputs.majorReleaseVersion }} ${{ github.event.inputs.releaseVersion }}

- name: Push new tag
run: git push origin ${{ github.event.inputs.majorReleaseVersion }} --force
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Dependencies
node_modules

# Project
# Project
lib

# IDEA
.idea/*
Loading