<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: Hansel Wei</title>
    <description>The latest articles on Forem by Hansel Wei (@hansel).</description>
    <link>https://forem.com/hansel</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F258934%2F3b133b77-d751-48dc-b983-ac2ffe3f4b0c.jpeg</url>
      <title>Forem: Hansel Wei</title>
      <link>https://forem.com/hansel</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/hansel"/>
    <language>en</language>
    <item>
      <title>Automate Node.js Version Bumps with GitHub Actions (No Manual PRs Needed)</title>
      <dc:creator>Hansel Wei</dc:creator>
      <pubDate>Tue, 24 Feb 2026 01:10:00 +0000</pubDate>
      <link>https://forem.com/hansel/automate-nodejs-version-bumps-with-github-actions-no-manual-prs-needed-ol8</link>
      <guid>https://forem.com/hansel/automate-nodejs-version-bumps-with-github-actions-no-manual-prs-needed-ol8</guid>
      <description>&lt;p&gt;Manually bumping a package version is one of those low-value chores that's easy to forget, easy to mess up, and just annoying enough to interrupt your flow. You change &lt;code&gt;package.json&lt;/code&gt;, regenerate the lockfile, commit it, open a PR — every time, for every release.&lt;/p&gt;

&lt;p&gt;There's a better way: let a GitHub Actions workflow handle the entire thing on demand.&lt;/p&gt;

&lt;p&gt;Here's an example project with the workflow pattern I set up for one of my open source dev tool &lt;a href="https://github.com/darkmastermindz/line-commenter-tool" rel="noopener noreferrer"&gt;line-commenter-tool&lt;/a&gt;, which you can adapt for any Node.js project.&lt;/p&gt;




&lt;h2&gt;
  
  
  What It Does
&lt;/h2&gt;

&lt;p&gt;When you're ready to cut a new version, you trigger a workflow dispatch from the GitHub Actions UI (or via the API/CLI). The workflow:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Checks out your target branch&lt;/li&gt;
&lt;li&gt;Bumps the version in &lt;code&gt;package.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Runs &lt;code&gt;npm ci&lt;/code&gt; to regenerate &lt;code&gt;package-lock.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Opens a pull request with a clean commit and auto-generated description&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The resulting PR looks similar to this:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;chore: bump version to 2.1.0&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Updated &lt;code&gt;package.json&lt;/code&gt; version to &lt;code&gt;2.1.0&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Regenerated &lt;code&gt;package-lock.json&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Verified install with &lt;code&gt;npm ci&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;em&gt;Triggered via workflow dispatch by &lt;a class="mentioned-user" href="https://dev.to/hansel"&gt;@hansel&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;No manual work. No forgotten lockfile updates. Just review and merge.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Workflow
&lt;/h2&gt;

&lt;p&gt;Create &lt;code&gt;.github/workflows/bump-version.yml&lt;/code&gt;:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;workflow_dispatch&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;inputs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;'&lt;/span&gt;&lt;span class="s"&gt;New&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;semver&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;version&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;(e.g.&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;2.2.0)'&lt;/span&gt;
        &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
        &lt;span class="na"&gt;type&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;string&lt;/span&gt;
      &lt;span class="na"&gt;target_branch&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
        &lt;span class="na"&gt;description&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;Branch&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;to&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;bump&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;version&lt;/span&gt;&lt;span class="nv"&gt; &lt;/span&gt;&lt;span class="s"&gt;on"&lt;/span&gt;
        &lt;span class="na"&gt;required&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;
        &lt;span class="na"&gt;default&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="s"&gt;main"&lt;/span&gt;

&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;bump-version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;permissions&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="na"&gt;contents&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;write&lt;/span&gt;
      &lt;span class="na"&gt;pull-requests&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;write&lt;/span&gt;

    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v6&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;fetch-depth&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/setup-node@v6&lt;/span&gt;
        &lt;span class="na"&gt;with&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;node-version&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Validate version input&lt;/span&gt;
        &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;validate&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;VERSION="${{ github.event.inputs.version }}"&lt;/span&gt;

          &lt;span class="s"&gt;# Validate semver format (major.minor.patch with optional pre-release/build metadata)&lt;/span&gt;
          &lt;span class="s"&gt;if ! echo "$VERSION" | grep -Eq '^(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(-((0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*)(\.(0|[1-9][0-9]*|[0-9]*[a-zA-Z-][0-9a-zA-Z-]*))*))?(\+([0-9a-zA-Z-]+(\.[0-9a-zA-Z-]+)*))?$'; then&lt;/span&gt;
            &lt;span class="s"&gt;echo "ERROR: '$VERSION' is not a valid semver version."&lt;/span&gt;
            &lt;span class="s"&gt;exit 1&lt;/span&gt;
          &lt;span class="s"&gt;fi&lt;/span&gt;

          &lt;span class="s"&gt;CURRENT_VERSION=$(node -p "require('./package.json').version")&lt;/span&gt;
          &lt;span class="s"&gt;echo "current=$CURRENT_VERSION" &amp;gt;&amp;gt; "$GITHUB_OUTPUT"&lt;/span&gt;
          &lt;span class="s"&gt;echo "Current version: $CURRENT_VERSION"&lt;/span&gt;
          &lt;span class="s"&gt;echo "Requested version: $VERSION"&lt;/span&gt;

          &lt;span class="s"&gt;# Validate new version is strictly greater than current using Node&lt;/span&gt;
          &lt;span class="s"&gt;node -e "&lt;/span&gt;
            &lt;span class="s"&gt;const parseBase = (v) =&amp;gt; v.replace(/-.*/, '').split('.').map(Number);&lt;/span&gt;
            &lt;span class="s"&gt;const curr = parseBase('$CURRENT_VERSION');&lt;/span&gt;
            &lt;span class="s"&gt;const next = parseBase('$VERSION');&lt;/span&gt;
            &lt;span class="s"&gt;for (let i = 0; i &amp;lt; 3; i++) {&lt;/span&gt;
              &lt;span class="s"&gt;if (next[i] &amp;gt; curr[i]) { console.log('Validation passed: $VERSION &amp;gt; $CURRENT_VERSION'); process.exit(0); }&lt;/span&gt;
              &lt;span class="s"&gt;if (next[i] &amp;lt; curr[i]) {&lt;/span&gt;
                &lt;span class="s"&gt;console.error('ERROR: $VERSION is not greater than current version $CURRENT_VERSION');&lt;/span&gt;
                &lt;span class="s"&gt;process.exit(1);&lt;/span&gt;
              &lt;span class="s"&gt;}&lt;/span&gt;
            &lt;span class="s"&gt;}&lt;/span&gt;
            &lt;span class="s"&gt;console.error('ERROR: $VERSION must be strictly greater than current version $CURRENT_VERSION (equal versions are not allowed)');&lt;/span&gt;
            &lt;span class="s"&gt;process.exit(1);&lt;/span&gt;
          &lt;span class="s"&gt;"&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Configure Git&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;git config user.name "github-actions[bot]"&lt;/span&gt;
          &lt;span class="s"&gt;git config user.email "github-actions[bot]@users.noreply.github.com"&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Create release branch&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;git checkout -b "chore/bump-version-${{ github.event.inputs.version }}"&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Bump version in package.json&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npm version ${{ github.event.inputs.version }} --no-git-tag-version&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Regenerate package-lock.json&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npm install --package-lock-only&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Verify with npm ci&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npm ci&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Commit changes&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;git add package.json package-lock.json&lt;/span&gt;
          &lt;span class="s"&gt;git commit -m "chore: bump version to ${{ github.event.inputs.version }}"&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Push branch&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;git push origin "chore/bump-version-${{ github.event.inputs.version }}"&lt;/span&gt;

      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Create Pull Request&lt;/span&gt;
        &lt;span class="na"&gt;env&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
          &lt;span class="na"&gt;GH_TOKEN&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;${{ secrets.GITHUB_TOKEN }}&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;BODY=$(cat &amp;lt;&amp;lt;'PREOF'&lt;/span&gt;
          &lt;span class="s"&gt;## Version Bump&lt;/span&gt;

          &lt;span class="s"&gt;Bumps the package version from `CURRENT_PLACEHOLDER` to `VERSION_PLACEHOLDER`.&lt;/span&gt;

          &lt;span class="s"&gt;### Changes&lt;/span&gt;
          &lt;span class="s"&gt;- Updated `package.json` version to `VERSION_PLACEHOLDER`&lt;/span&gt;
          &lt;span class="s"&gt;- Regenerated `package-lock.json`&lt;/span&gt;
          &lt;span class="s"&gt;- Verified install with `npm ci`&lt;/span&gt;

          &lt;span class="s"&gt;---&lt;/span&gt;
          &lt;span class="s"&gt;_Triggered via workflow dispatch by @ACTOR_PLACEHOLDER_&lt;/span&gt;
          &lt;span class="s"&gt;PREOF&lt;/span&gt;
          &lt;span class="s"&gt;)&lt;/span&gt;

          &lt;span class="s"&gt;BODY="${BODY//CURRENT_PLACEHOLDER/${{ steps.validate.outputs.current }}}"&lt;/span&gt;
          &lt;span class="s"&gt;BODY="${BODY//VERSION_PLACEHOLDER/${{ github.event.inputs.version }}}"&lt;/span&gt;
          &lt;span class="s"&gt;BODY="${BODY//ACTOR_PLACEHOLDER/${{ github.actor }}}"&lt;/span&gt;

          &lt;span class="s"&gt;gh pr create \&lt;/span&gt;
            &lt;span class="s"&gt;--title "chore: bump version to ${{ github.event.inputs.version }}" \&lt;/span&gt;
            &lt;span class="s"&gt;--body "$BODY" \&lt;/span&gt;
            &lt;span class="s"&gt;--base ${{ github.event.inputs.target_branch }} \&lt;/span&gt;
            &lt;span class="s"&gt;--head "chore/bump-version-${{ github.event.inputs.version }}"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Aside: Alternatively, you can try setting default input &lt;code&gt;target_branch&lt;/code&gt; to &lt;code&gt;${{ github.ref_name }}&lt;/code&gt; if you prefer to bump versions into feature branches rather than main and dynamically reference the current branch you are targeting.&lt;/p&gt;




&lt;h2&gt;
  
  
  How to Use It
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;From the GitHub UI:&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Go to your repo → &lt;strong&gt;Actions&lt;/strong&gt; tab&lt;/li&gt;
&lt;li&gt;Select &lt;strong&gt;Bump Version&lt;/strong&gt; from the left sidebar&lt;/li&gt;
&lt;li&gt;Click &lt;strong&gt;Run workflow&lt;/strong&gt;
&lt;/li&gt;
&lt;li&gt;Enter the new version number and target branch&lt;/li&gt;
&lt;li&gt;Hit &lt;strong&gt;Run workflow&lt;/strong&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Within seconds, a PR appears targeting your branch. Review the diff (should just be &lt;code&gt;package.json&lt;/code&gt; and &lt;code&gt;package-lock.json&lt;/code&gt;), then merge.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;From the CLI with &lt;code&gt;gh&lt;/code&gt;:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gh workflow run bump-version.yml &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="nv"&gt;version&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;2.1.0 &lt;span class="se"&gt;\&lt;/span&gt;
  &lt;span class="nt"&gt;-f&lt;/span&gt; &lt;span class="nv"&gt;target_branch&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;my-feature-branch
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Why This Pattern Works Well
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;It fits into your existing review process.&lt;/strong&gt; The version bump goes through a PR like any other change. You get to review it, run your CI checks, and merge intentionally.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The bot commit is honest.&lt;/strong&gt; The commit is attributed to &lt;code&gt;github-actions[bot]&lt;/code&gt;, so your git history clearly shows which bumps were automated versus manual. No noise in your contributor graph.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It handles the lockfile correctly.&lt;/strong&gt; Running &lt;code&gt;npm ci&lt;/code&gt; after the version bump ensures the lockfile is consistent. This catches any edge cases where a stale lockfile might cause issues downstream.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;It targets feature branches, not just main.&lt;/strong&gt; Because &lt;code&gt;target_branch&lt;/code&gt; is an input, you can bump the version on a release branch or a feature branch mid-development — useful when you're preparing multiple releases in parallel.&lt;/p&gt;




&lt;h2&gt;
  
  
  Variations Worth Considering
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Auto-detect the current version and increment it:&lt;/strong&gt; Instead of specifying the full version, accept a bump type (&lt;code&gt;patch&lt;/code&gt;, &lt;code&gt;minor&lt;/code&gt;, &lt;code&gt;major&lt;/code&gt;) and use &lt;code&gt;npm version patch --no-git-tag-version&lt;/code&gt; to let npm calculate it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Bump version&lt;/span&gt;
  &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;npm version ${{ github.event.inputs.bump_type }} --no-git-tag-version&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Auto-merge on approval:&lt;/strong&gt; Add a &lt;code&gt;pull_request_review&lt;/code&gt; trigger or use a merge queue to automatically merge version bump PRs after CI passes, removing the need to manually merge them.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Tag the release after merge:&lt;/strong&gt; Chain a second workflow that listens for merged PRs with the &lt;code&gt;chore/bump-version-*&lt;/code&gt; naming pattern and creates a git tag automatically.&lt;/p&gt;




&lt;h2&gt;
  
  
  Wrapping Up
&lt;/h2&gt;

&lt;p&gt;This is a small workflow but it removes a surprisingly persistent source of friction. Once it's in place, you stop thinking about version bumps entirely — you just trigger the workflow, review the PR, and merge. &lt;/p&gt;

&lt;p&gt;The full example is live in the &lt;a href="https://github.com/darkmastermindz/line-commenter-tool/pull/93" rel="noopener noreferrer"&gt;line-commenter-tool repo&lt;/a&gt; if you want to see what the generated PR looks like in practice.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Have a variation of this pattern that works well for your project? Drop it in the comments.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>github</category>
      <category>automation</category>
      <category>devops</category>
    </item>
    <item>
      <title>Breadth vs Depth - How do you organize your brain as a software engineer and communicate with different styles?</title>
      <dc:creator>Hansel Wei</dc:creator>
      <pubDate>Fri, 30 Jun 2023 12:56:05 +0000</pubDate>
      <link>https://forem.com/hansel/breadth-vs-depth-how-do-you-organize-your-brain-as-a-software-engineer-and-communicate-with-different-styles-44ah</link>
      <guid>https://forem.com/hansel/breadth-vs-depth-how-do-you-organize-your-brain-as-a-software-engineer-and-communicate-with-different-styles-44ah</guid>
      <description>&lt;p&gt;Paired teamwork makes the dream work! Recently, one of my colleagues worked on filling out a requirements document to lead a new project with me and the synergy of how we thought in opposite ways helped complete our goal in minutes. We both emailed each other about it and was struggling define everything asynchronously so we both hopped on a call and sorted things out.&lt;/p&gt;

&lt;p&gt;What was our secret sauce to success from ideation to defining constraints? It was our different approaches and processes in design thinking! We quickly identified that we had different styles and had a conversation about breadth vs depth. We organized our conversation by taking turns to understand our differences, allowing us to complement each other's perspectives, styles of communication, and design thinking processes. This helped us effectively leverage our unique strengths and collaborate seamlessly.&lt;/p&gt;

&lt;p&gt;This experience strongly resonated with Tim Cook's quote on how diversity leads to better products, as it highlighted the power of embracing different perspectives:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"If you believe, as we believe, that diversity leads to better products, and we're all about making products that enrich people's lives, then you obviously put a ton of energy behind diversity the same way you would put a ton of energy behind anything else that is truly important." - Tim Cook&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Whenever you make a decision for simplicity sake, we can model this as the brain choosing between &lt;strong&gt;Decision A&lt;/strong&gt; and &lt;strong&gt;Decision B&lt;/strong&gt; so in computer science we'd most likely model this representation as a Decision Tree. If you studied Data Structures and Algorithms, you'd know about two different patterns, depth first search (DFS) vs breadth first search (BFS)&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd8ujng132kpqo7actsbk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fd8ujng132kpqo7actsbk.jpg" alt="Image description" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Depth-first search&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We traverse through left subtree(s) first then traverse through the right subtrees&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;strong&gt;Breadth-first search&lt;/strong&gt; involves search through a tree one level at a time.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;We traverse through one entire level of children nodes first (Decision A and Decision B), before moving on to traverse through the grandchildren nodes. And we traverse through an entire level of grandchildren nodes before going on to traverse through great-grandchildren nodes.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;I must mention that this is a greatly simplified explanation. Our brains are more complex than continuously comparing two parameters in a linear fashion. Exploring the intricacies of decision-making, which involves multiple parameters, falls beyond the scope of this post. If you're interested in learning how data scientists model many parameters to make decisions, I encourage you to search for information on &lt;a href="https://www.geeksforgeeks.org/difference-between-ann-and-bnn/"&gt;Artificial Neural Networks (ANN) vs Biological Neural Networks (BNN)&lt;/a&gt; in your next google search to understand the differences between computer-modeled and biological decision-making!&lt;/p&gt;

&lt;p&gt;In its simplest form, when explaining AI to someone, you can consider &lt;a href="https://towardsdatascience.com/pushing-towards-the-explainable-ai-era-neural-networks-are-decision-trees-1603ab97eb1b"&gt;artificial neural network are decision trees&lt;/a&gt; with more parameters. They incorporate statistics, probability math, designs on how nodes flow and communicate information, and algorithms applied.&lt;/p&gt;

&lt;p&gt;With that, I leave you with these questions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;How do you organize your thoughts? - What about when problem solving with someone on your team vs your approach to learning new skills alone? (Breadth vs Depth)&lt;/li&gt;
&lt;li&gt;What struggles do you have with your team when communicating - how did you resolve this?&lt;/li&gt;
&lt;li&gt;How do you design your communication flows?&lt;/li&gt;
&lt;li&gt;What can be improved - who and what conversations can help you grow as a engineer, developer, or leader?&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Stay curious!&lt;/p&gt;

</description>
      <category>algorithms</category>
      <category>computerscience</category>
      <category>productivity</category>
      <category>softwareengineering</category>
    </item>
  </channel>
</rss>
