Skip to content

Conversation

caidanw
Copy link
Contributor

@caidanw caidanw commented Jun 10, 2025

Summary

  • Fix release workflow to correctly package font files from public/fonts instead of the previous fonts directory
  • Update build workflow to only run on pull requests to main branch
  • Improve CI/CD reliability with npm ci and updated action versions

Details

The release workflow was failing to create the fonts.zip artifact because the font files were moved from /fonts to /public/fonts but the workflow wasn't updated. This PR fixes that issue and makes several other improvements:

  1. Release workflow fixes:

    • Correct the fonts directory path to public/fonts
    • Rename artifact to ServerMono-fonts.zip for clarity
    • Add artifact error handling and release options
  2. Build workflow improvements:

    • Only trigger on PRs to main (not every push)
    • Use npm ci instead of npm install for faster, reproducible builds
    • Update checkout action to v4
  3. General improvements:

    • Fix actionlint warnings about outdated action versions
    • Ensure semantic versioning pattern for release tags

@caidanw caidanw force-pushed the caidanw/update-cicd branch from 3f6724c to d26118c Compare June 10, 2025 22:19
caidanw added 7 commits June 10, 2025 15:22
Only run build workflow when pull requests target the main branch,
preventing unnecessary builds on feature branch pushes.
Change tag pattern to require v prefix (e.g., v1.0.0) following
semantic versioning conventions.
Update release workflow to zip fonts from public/fonts directory
where they were moved, fixing missing artifacts in releases.
- Rename fonts.zip to ServerMono-fonts.zip for clarity
- Add artifactErrorsFailBuild to catch upload failures
- Include individual font files as artifacts
Update checkout action from v3 to v4 to address actionlint
warnings and ensure compatibility.
Replace npm install with npm ci for faster, more reliable builds
with reproducible dependency installation.
Enable npm ci in CI/CD workflows by committing package-lock.json.
This ensures consistent dependency versions across environments
and faster, more reliable builds.
@caidanw caidanw force-pushed the caidanw/update-cicd branch from d26118c to 19d2efe Compare June 10, 2025 22:23
@caidanw caidanw requested a review from jimmylee June 10, 2025 22:24
@caidanw caidanw changed the title fix(cicd): fix release artifacts and improve workflow reliability ci: fix release artifacts and improve workflow reliability Jun 10, 2025
@caidanw caidanw changed the title ci: fix release artifacts and improve workflow reliability ci: fix release artifacts and optimize build workflows Jun 10, 2025
Copy link
Collaborator

@jimmylee jimmylee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@caidanw caidanw merged commit 046c7a3 into main Jun 10, 2025
1 check passed
@caidanw caidanw deleted the caidanw/update-cicd branch June 10, 2025 22:47
caidanw added a commit that referenced this pull request Jun 10, 2025
* ci: restrict build workflow to PRs targeting main

Only run build workflow when pull requests target the main branch,
preventing unnecessary builds on feature branch pushes.

* ci: update release trigger to semantic version pattern

Change tag pattern to require v prefix (e.g., v1.0.0) following
semantic versioning conventions.

* fix: correct fonts directory path in release workflow

Update release workflow to zip fonts from public/fonts directory
where they were moved, fixing missing artifacts in releases.

* ci: rename release artifact and add error handling

- Rename fonts.zip to ServerMono-fonts.zip for clarity
- Add artifactErrorsFailBuild to catch upload failures
- Include individual font files as artifacts

* ci: update GitHub Actions to latest versions

Update checkout action from v3 to v4 to address actionlint
warnings and ensure compatibility.

* ci: use npm ci in build workflow

Replace npm install with npm ci for faster, more reliable builds
with reproducible dependency installation.

* build: track package-lock.json for reproducible builds

Enable npm ci in CI/CD workflows by committing package-lock.json.
This ensures consistent dependency versions across environments
and faster, more reliable builds.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants