Skip to content

feat: improve tests performance #7

feat: improve tests performance

feat: improve tests performance #7

Workflow file for this run

name: Release Prod
on:
push:
branches:
- master
permissions:
contents: write
jobs:
create_release_notes:
if: github.ref_type == 'branch' && github.ref_name == 'master'
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 9
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
cache: pnpm
cache-dependency-path: pnpm-lock.yaml
- name: Install dependencies
run: pnpm install
- name: Release
run: |
pnpm semantic-release --dry-run | \
awk '/The next release version is ([0-9]+\.[0-9]+\.[0-9]+)/{ print $0 }' | \
awk '{split($0, array, "version is "); print array[2]}' > version.txt
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Check if there is anything worth a releasing
run: |
[ -s version.txt ] || exit 1
- name: Create Release
run: |
gh api \
--method POST \
-H "Accept: application/vnd.github+json" \
-H "X-GitHub-Api-Version: 2022-11-28" \
/repos/${{github.repository}}/releases \
-f tag_name="v$(cat version.txt)" \
-f target_commitish=${{github.ref}} \
-f name="Production v$(cat version.txt)" \
-F generate_release_notes=true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}