chore: update package-lock.json, fix npm audit vulnerabilities (qs, b… #4
Workflow file for this run
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: Create Release | |
| on: | |
| push: | |
| tags: | |
| - 'v*' | |
| permissions: | |
| contents: write | |
| jobs: | |
| verify: | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3 | |
| with: | |
| node-version: 20 | |
| cache: 'npm' | |
| - name: Install backend dependencies | |
| run: npm ci | |
| - name: Lint backend | |
| run: npm run lint | |
| - name: Install frontend dependencies | |
| run: npm run frontend:install | |
| - name: Build frontend | |
| run: npm run frontend:build | |
| release: | |
| needs: verify | |
| runs-on: ubuntu-latest | |
| if: startsWith(github.ref, 'refs/tags/') | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
| - name: Extract Release Notes from CHANGELOG | |
| id: changelog | |
| run: | | |
| # Get the version from the tag (e.g., v0.7.4 -> 0.7.4) | |
| VERSION="${GITHUB_REF#refs/tags/v}" | |
| echo "Extracting changelog for version: $VERSION" | |
| # Extract the section for this version from CHANGELOG.md | |
| # Uses awk with version passed as variable to avoid quoting issues | |
| awk -v ver="$VERSION" ' | |
| BEGIN { found=0 } | |
| $0 ~ "^## \\[v?" ver "\\]" { found=1; next } | |
| /^## \[/ { if(found) exit } | |
| found { print } | |
| ' CHANGELOG.md > release_notes.md | |
| # If no notes found, use a default message | |
| if [ ! -s release_notes.md ]; then | |
| echo "Release v$VERSION" > release_notes.md | |
| echo "No changelog entry found for version $VERSION, using default message" | |
| fi | |
| echo "Release notes extracted successfully:" | |
| cat release_notes.md | |
| - name: Create GitHub Release | |
| uses: softprops/action-gh-release@v2 | |
| with: | |
| body_path: release_notes.md | |
| generate_release_notes: false | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |