chore: added CHANGELOG.md #5
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: "ci: update changelog" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| update-changelog: | |
| if: ${{ !startsWith(github.event.head_commit.message, 'release(') }} | |
| runs-on: blacksmith-2vcpu-ubuntu-2404 | |
| timeout-minutes: 30 | |
| strategy: | |
| matrix: | |
| project: [lazyreview] | |
| permissions: | |
| id-token: write | |
| contents: write | |
| pull-requests: write | |
| actions: write | |
| steps: | |
| - name: "Check out repository" | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Nix with Cache | |
| uses: ./.github/actions/setup-nix | |
| with: | |
| NAME: ${{ inputs.NAME }} | |
| NIX_CACHE_PUB_KEY: ${{ secrets.NIX_CACHE_PUB_KEY }} | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: "Get next version" | |
| id: version | |
| run: | | |
| TAG_NAME=$(make release-tag-name) | |
| VERSION=$(nix develop .\#cliff -c make changelog-next-version) | |
| if git tag | grep -qx "$TAG_NAME@$VERSION"; then | |
| echo "Tag $TAG_NAME@$VERSION already exists, skipping release preparation" | |
| else | |
| echo "Tag $TAG_NAME@$VERSION does not exist, proceeding with release preparation" | |
| echo "version=$VERSION" >> $GITHUB_OUTPUT | |
| fi | |
| - name: "Update changelog" | |
| if: steps.version.outputs.version != '' | |
| run: | | |
| nix develop .\#cliff -c make changelog-update | |
| - name: "Create Pull Request" | |
| if: steps.version.outputs.version != '' | |
| uses: peter-evans/create-pull-request@v8 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| commit-message: "release(${{ matrix.project }}): ${{ steps.version.outputs.version }}" | |
| title: "release(${{ matrix.project }}): ${{ steps.version.outputs.version }}" | |
| committer: GitHub <noreply@github.com> | |
| author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com> | |
| body: | | |
| Automated release preparation for ${{ matrix.project }} version ${{ steps.version.outputs.version }} | |
| Changes: | |
| - Updated CHANGELOG.md | |
| branch: release/${{ matrix.project }} | |
| delete-branch: true | |
| labels: | | |
| release,${{ matrix.project }} |