Skip to content

feat: add structured logging and observability hooks #6

feat: add structured logging and observability hooks

feat: add structured logging and observability hooks #6

Workflow file for this run

name: Auto Release After Dependency Update
on:
pull_request:
types: [closed]
branches: [main]
jobs:
auto-release:
if: github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'dependencies')
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get latest tag
id: tag
run: |
LATEST=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0")
echo "latest=$LATEST" >> $GITHUB_OUTPUT
echo "Latest tag: $LATEST"
- name: Bump patch version
id: bump
run: |
VERSION=${{ steps.tag.outputs.latest }}
MAJOR=$(echo $VERSION | cut -d. -f1)
MINOR=$(echo $VERSION | cut -d. -f2)
PATCH=$(echo $VERSION | cut -d. -f3)
NEW_PATCH=$((PATCH + 1))
NEW_VERSION="${MAJOR}.${MINOR}.${NEW_PATCH}"
echo "version=$NEW_VERSION" >> $GITHUB_OUTPUT
echo "New version: $NEW_VERSION"
- name: Create and push tag
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git tag ${{ steps.bump.outputs.version }}
git push origin ${{ steps.bump.outputs.version }}
echo "Created and pushed tag: ${{ steps.bump.outputs.version }}"