name: Main Push Changelog on: push: branches: - main permissions: contents: write pull-requests: read concurrency: group: main-push-${{ github.ref }} cancel-in-progress: true jobs: main-push-changelog: name: Generate main push changelog runs-on: ubuntu-24.04-arm steps: - name: Checkout code uses: actions/checkout@v6 with: fetch-depth: 0 - name: Determine last tag id: last_prod_tag run: | TAG=$(git describe --tags --abbrev=0 2>/dev/null || echo "") echo "Found last tag: $TAG" echo "tag=$TAG" >> "$GITHUB_OUTPUT" - name: Generate changelog from last tag to current if: steps.last_prod_tag.outputs.tag != '' uses: mikepenz/release-changelog-builder-action@v6 id: changelog with: configuration: .github/release.yml fromTag: ${{ steps.last_prod_tag.outputs.tag }} toTag: ${{ github.sha }} outputFile: main-push-changelog.md env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Upload changelog artifact if: steps.last_prod_tag.outputs.tag != '' uses: actions/upload-artifact@v7 with: name: main-push-changelog path: main-push-changelog.md - name: Print main push summary env: LAST_TAG: ${{ steps.last_prod_tag.outputs.tag }} run: | echo "Pushed to main" echo "SHA: $GITHUB_SHA" echo "Actor: $GITHUB_ACTOR" echo "Ref: $GITHUB_REF" echo "" if [ "$LAST_TAG" != "" ]; then echo "Changelog since last tag ($LAST_TAG)": echo "----------------------------------------" cat main-push-changelog.md else echo "No tag found. Skipping changelog generation." fi