fix(release): repair the release pipeline and sign released artifacts #291
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Changelog Validation | |
| on: | |
| pull_request: | |
| paths: | |
| - 'CHANGELOG.md' | |
| - '.git-changelog.toml' | |
| - '.changelog-template.md' | |
| - 'dev-tools/release/changelog_manager.py' | |
| - '.github/workflows/changelog-validation.yml' | |
| workflow_dispatch: | |
| jobs: | |
| config: | |
| name: Get Configuration | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| permissions: | |
| contents: read | |
| outputs: | |
| default-python-version: ${{ steps.config.outputs.default-python-version }} | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| - name: Get project configuration | |
| id: config | |
| uses: ./.github/actions/get-config | |
| setup-cache: | |
| name: Setup Cache | |
| needs: config | |
| uses: ./.github/workflows/cache-management.yml | |
| with: | |
| cache-type: dependencies | |
| cache-key-base: deps | |
| python-version: ${{ needs.config.outputs.default-python-version }} | |
| validate-changelog: | |
| name: Validate Changelog Format | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| needs: [config, setup-cache] | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| fetch-depth: 0 # Need full history for changelog generation | |
| - name: Setup Python and UV | |
| uses: ./.github/actions/setup-uv-cached | |
| with: | |
| cache-key: ${{ needs.setup-cache.outputs.cache-key }} | |
| fail-on-cache-miss: false | |
| - name: Install changelog dependencies | |
| run: | | |
| uv pip install git-changelog | |
| - name: Validate changelog format | |
| run: | | |
| make changelog-validate | |
| - name: Check changelog is up to date | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| echo "Checking if changelog needs updates..." | |
| # Get base branch | |
| BASE_SHA="${{ github.event.pull_request.base.sha }}" | |
| HEAD_SHA="${{ github.sha }}" | |
| # Check if there are commits that should be in changelog | |
| COMMIT_COUNT=$(git rev-list --count "${BASE_SHA}..${HEAD_SHA}") | |
| if [ "$COMMIT_COUNT" -gt 0 ]; then | |
| echo "Found $COMMIT_COUNT new commits" | |
| # Check if changelog was modified | |
| if git diff --name-only "${BASE_SHA}..${HEAD_SHA}" | grep -q "CHANGELOG.md"; then | |
| echo "Changelog was updated" | |
| else | |
| echo "WARNING: New commits found but changelog not updated" | |
| echo "Consider running: make changelog-preview" | |
| # Don't fail - just warn | |
| fi | |
| else | |
| echo "No new commits to check" | |
| fi | |
| - name: Preview changelog changes | |
| if: github.event_name == 'pull_request' | |
| run: | | |
| { | |
| echo "## Changelog Preview" | |
| echo "" | |
| echo "Changes that would be added to changelog:" | |
| echo "" | |
| echo '```markdown' | |
| } >> "$GITHUB_STEP_SUMMARY" | |
| make changelog-preview FROM_COMMIT="${{ github.event.pull_request.base.sha }}" >> "$GITHUB_STEP_SUMMARY" || echo "No changes to preview" >> "$GITHUB_STEP_SUMMARY" | |
| echo '```' >> "$GITHUB_STEP_SUMMARY" |