Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

ci: :construction_worker: updating changelog generation

Andrej1ed8646c36d1
diff --git a/.github/workflows/auto-assign.yml b/.github/workflows/auto-assign.yml
index 11c93e21b..897b028c8 100644
--- a/.github/workflows/auto-assign.yml
+++ b/.github/workflows/auto-assign.yml
@@ -6,7 +6,7 @@ on:
types: [opened]
jobs:
run:
- runs-on: ubuntu-latest
+ runs-on: ubuntu-24.04
permissions:
issues: write
pull-requests: write
diff --git a/.github/workflows/changelog.yml b/.github/workflows/changelog.yml
index 1aa88217e..3f0a43115 100644
--- a/.github/workflows/changelog.yml
+++ b/.github/workflows/changelog.yml
@@ -1,36 +1,65 @@
-name: Generate Changelog and Create Patch Version
on:
push:
branches:
- main
+ pull_request:
+
+permissions:
+ contents: write
+ packages: write
+ pull-requests: write
jobs:
- generate-changelog:
+ changelog:
+ name: Changelog
+ if: github.event_name != 'pull_request'
runs-on: ubuntu-24.04
- permissions:
- contents: write
+
+ outputs:
+ skipped: ${{ steps.changelog.outputs.skipped }}
+ tag: ${{ steps.changelog.outputs.tag }}
+ clean_changelog: ${{ steps.changelog.outputs.clean_changelog }}
+ version: ${{ steps.changelog.outputs.version }}
+
+ env:
+ PR_BRANCH: release-ci-${{ github.sha }}
+
steps:
- - name: Checkout repository
- uses: actions/checkout@v4
- with:
- fetch-depth: 0
+ - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11
+ - name: Create Branch
+ run: |
+ git checkout -b ${{ env.PR_BRANCH }}
- - name: Set up Node.js
- uses: actions/setup-node@v4
+ - name: Create Changelog
+ uses: TriPSs/conventional-changelog-action@dd734f74fce61a6e02f821ee1b5930bc79a23534
+ id: changelog
with:
- node-version: 20
+ github-token: ${{ github.token }}
+ git-user-name: "github-actions[bot]"
+ git-user-email: "github-actions[bot]@users.noreply.github.com"
+ git-branch: ${{ env.PR_BRANCH }}
+ skip-git-pull: true
+ output-file: false
+ version-file: .github/package.yaml
+ create-summary: true
- - name: Install standard-version
- run: npm install -g standard-version
-
- - name: Configure Git
+ - name: Create Changelog PR
+ if: steps.changelog.outputs.skipped == 'false'
run: |
- git config --global user.name "GitHub Actions"
- git config --global user.email "[email protected]"
+ gh pr create --base main --head ${{ env.PR_BRANCH }} --title 'chore(release): ${{ steps.changelog.outputs.tag }} [skip-ci]' --body '${{ steps.changelog.outputs.clean_changelog }}'
+ env:
+ GH_TOKEN: ${{ github.token }}
- - name: Bump version and generate changelog (patch)
- run: npx standard-version --release-as patch
+ - name: Approve Changelog PR
+ if: steps.changelog.outputs.skipped == 'false'
+ run: |
+ gh pr review --approve ${{ env.PR_BRANCH }}
+ env:
+ GH_TOKEN: ${{ secrets.GH_TOKEN_ANDREJ }}
- - name: Push changes
+ - name: Merge Changelog PR
+ if: steps.changelog.outputs.skipped == 'false'
run: |
- git push --follow-tags origin main
\ No newline at end of file
+ gh pr merge --squash --auto --delete-branch ${{ env.PR_BRANCH }}
+ env:
+ GH_TOKEN: ${{ secrets.GH_TOKEN_ANDREJ }}
\ No newline at end of file