Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions .github/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
changelog:
categories:
- title: New features
labels:
- enhancement
- title: Bugfixes
labels:
- bug
- title: Other changes
labels:
- '*'
73 changes: 73 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
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
actions: 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

- name: Trigger ECR build
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
gh workflow run ecr-chatbot-prod.yml --ref "${{ steps.bump.outputs.new_version }}"
Loading