X Tutup
Skip to content

Tag and release generated but CHANGELOG.md not updated... #1387

@av603

Description

@av603

Question

I'm trying to generate a new release along with adding a new incremented tag and updating the CHANGELOG.md via a Github workflow. A new tag is created, new release created, pyproject.toml updated but the CHANGELOG.md is not updated. What am I missing in my configuration?

Configuration

Semantic Release Configuration
[changelog.default_templates.changelog_file]
changelog_file = "CHANGELOG.md"

[tool.semantic_release]
version_toml = ["pyproject.toml:tool.poetry.version"]
branch = "main"
major_on_zero = false
upload_to_release = true
upload_to_pypi = false
build_command = "poetry build"
upload_dists = true
tag_commit = true
tag_format = "{version}"
commit_parser = "conventional"
commit_changes = true

Additional context

name: Release & Publish

on:
  push:
    branches: [ main ]

jobs:
  run-tests:
    name: Run Tests
    uses: ./.github/workflows/test.yml
    with:
      python-versions: '["3.10", "3.11", "3.12"]'
    secrets: inherit

  release:
    name: Semantic Release & Publish
    needs: run-tests
    environment: pypi
    runs-on: ubuntu-latest
    if: github.ref == 'refs/heads/main'

    permissions:
      contents: write
      id-token: write

    steps:
      - uses: actions/checkout@v4
        with:
          fetch-depth: 0

      - name: Switch to main branch
        run: |
          git checkout main
          git pull origin main

      - name: Set up uv
        uses: astral-sh/setup-uv@v5
        with:
          python-version: 3.12

      - name: Install Poetry
        run: uv tool install poetry

      - name: Configure Git User
        run: |
          git config user.name "github-actions[bot]"
          git config user.email "github-actions[bot]@users.noreply.github.com"

      - name: Version and Changelog (Local)
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          uvx --from "python-semantic-release>=9.0.0" semantic-release version

      - name: Commit changes (Local)
        run: |
          git add CHANGELOG.md pyproject.toml
          git diff --staged --quiet || git commit -m "chore: update changelog [skip ci]"

      - name: Push changes to GitHub
        run: git push origin main

      - name: Publish to Github
        env:
          GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
        run: |
          uvx --from "python-semantic-release>=9.0.0" semantic-release publish

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      X Tutup