Skip to content

fix: resolve arrow function boundary detection in React components #2

fix: resolve arrow function boundary detection in React components

fix: resolve arrow function boundary detection in React components #2

Workflow file for this run

name: Auto Release
on:
push:
branches:
- main
paths:
- 'package.json'
jobs:
check-version:
runs-on: ubuntu-latest
outputs:
version-changed: ${{ steps.check.outputs.changed }}
new-version: ${{ steps.check.outputs.version }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 2
- name: Check if version changed
id: check
run: |
CURRENT_VERSION=$(node -p "require('./package.json').version")
git checkout HEAD~1 -- package.json 2>/dev/null || echo "First commit"
PREVIOUS_VERSION=$(node -p "require('./package.json').version" 2>/dev/null || echo "0.0.0")
git checkout HEAD -- package.json
echo "Current version: $CURRENT_VERSION"
echo "Previous version: $PREVIOUS_VERSION"
if [ "$CURRENT_VERSION" != "$PREVIOUS_VERSION" ]; then
echo "changed=true" >> $GITHUB_OUTPUT
echo "version=$CURRENT_VERSION" >> $GITHUB_OUTPUT
else
echo "changed=false" >> $GITHUB_OUTPUT
fi
ci:
needs: check-version
if: needs.check-version.outputs.version-changed == 'true'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npm
- run: npm ci
- name: Lint
run: npm run lint
- name: Format check
run: npm run format:check
- name: Build
run: npm run build
- name: Test
run: npx vitest --run
create-release:
needs: [check-version, ci]
if: needs.check-version.outputs.version-changed == 'true'
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- name: Create Release
uses: softprops/action-gh-release@v2
with:
tag_name: v${{ needs.check-version.outputs.new-version }}
name: Release v${{ needs.check-version.outputs.new-version }}
body: |
## Changes in v${{ needs.check-version.outputs.new-version }}
See [commits](https://github.com/${{ github.repository }}/commits/v${{ needs.check-version.outputs.new-version }}) for details.
## Installation
```bash
npm install -g eff-u-code@${{ needs.check-version.outputs.new-version }}
```
draft: false
prerelease: false
generate_release_notes: true
make_latest: true