Release v0.7.0 by epszaw #29
This file contains hidden or 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: "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: | |
| - v0 | |
| 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 | |
| - name: Enable Corepack | |
| run: corepack enable | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version: 24 | |
| cache: "yarn" | |
| - name: Install dependencies | |
| run: yarn install --immutable --immutable-cache --check-cache | |
| - name: Build TypeScript | |
| run: yarn build | |
| - name: Run tests | |
| run: yarn test | |
| - 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 |