From b14048edcd190d66cc789175e8e99a393963aef0 Mon Sep 17 00:00:00 2001 From: Farhad Jay Date: Thu, 7 May 2026 12:14:15 -0700 Subject: [PATCH 1/3] Add manually-triggered release workflow Bumps version (patch/minor/major), runs lint and tests, commits, tags, and publishes a GitHub release with auto-generated notes. The pushed v* tag fires the existing ECR build workflow. --- .github/workflows/release.yml | 66 +++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) create mode 100644 .github/workflows/release.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..7f368c1 --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,66 @@ +name: Release + +on: + workflow_dispatch: + inputs: + version_type: + description: 'Version bump type' + required: true + default: patch + type: choice + options: + - patch + - minor + - major + +concurrency: + group: release + cancel-in-progress: false + +jobs: + release: + name: Bump version and release + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - uses: actions/setup-node@v4 + with: + node-version: 22 + cache: npm + + - run: npm ci + + - name: Lint + run: npm run lint + + - name: Test + run: | + cp lib/configuration/sample.config.json lib/configuration/prod.config.json + npm test + + - name: Configure git + run: | + git config user.name "github-actions[bot]" + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" + + - name: Bump version, commit, tag + id: bump + run: | + NEW_VERSION=$(npm version ${{ inputs.version_type }} -m "%s") + echo "new_version=${NEW_VERSION}" >> "$GITHUB_OUTPUT" + + - name: Push commit and tag + run: git push --follow-tags origin master + + - name: Create GitHub Release + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh release create "${{ steps.bump.outputs.new_version }}" \ + --title "${{ steps.bump.outputs.new_version }}" \ + --generate-notes From 67ad77a0abebf46ab87305295b4ed0069d52a3ff Mon Sep 17 00:00:00 2001 From: Farhad Jay Date: Thu, 7 May 2026 12:17:30 -0700 Subject: [PATCH 2/3] Add release notes config to categorize changelog Groups auto-generated release notes into New features (enhancement), Bugfixes (bug), and Other changes (catch-all). --- .github/release.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/release.yml diff --git a/.github/release.yml b/.github/release.yml new file mode 100644 index 0000000..4e57bda --- /dev/null +++ b/.github/release.yml @@ -0,0 +1,11 @@ +changelog: + categories: + - title: New features + labels: + - enhancement + - title: Bugfixes + labels: + - bug + - title: Other changes + labels: + - '*' From 980b3836c0e3530f91bb8f25361222e02ceab056 Mon Sep 17 00:00:00 2001 From: Farhad Jay Date: Thu, 7 May 2026 12:28:48 -0700 Subject: [PATCH 3/3] Explicitly dispatch ECR workflow after release Tags pushed by GITHUB_TOKEN don't trigger other workflows (GitHub safeguard against recursive runs), so the ECR build's push:tags:v* trigger never fires. workflow_dispatch is exempt from that rule, so fire it explicitly with the new tag as --ref. --- .github/workflows/release.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 7f368c1..8b4aff4 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,6 +23,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: write + actions: write steps: - uses: actions/checkout@v4 with: @@ -64,3 +65,9 @@ jobs: gh release create "${{ steps.bump.outputs.new_version }}" \ --title "${{ steps.bump.outputs.new_version }}" \ --generate-notes + + - name: Trigger ECR build + env: + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: | + gh workflow run ecr-chatbot-prod.yml --ref "${{ steps.bump.outputs.new_version }}"