|
20 | 20 | - name: Generate commit history and schedule |
21 | 21 | id: generate-commits |
22 | 22 | run: | |
23 | | - # Get the commit history between master and dev |
24 | | - COMMIT_LIST=$(git log --pretty=format:"* %s (%h) by %an" origin/master..origin/dev) |
| 23 | + # Get the commit history between master and dev in conventional commit format |
| 24 | + COMMIT_LIST=$(git log --pretty=format:"* %s (%h) by %an" origin/master..dev | |
| 25 | + while IFS= read -r line; do |
| 26 | + if [[ ! $line =~ ^"* feat"* && ! $line =~ ^"* fix"* && ! $line =~ ^"* docs"* ]]; then |
| 27 | + echo "* chore${line:1}" |
| 28 | + else |
| 29 | + echo "$line" |
| 30 | + fi |
| 31 | + done) |
25 | 32 |
|
26 | 33 | # Handle empty commit list (branches are identical) |
27 | 34 | if [ -z "$COMMIT_LIST" ]; then |
|
77 | 84 | script: | |
78 | 85 | const { repo, owner } = context.repo; |
79 | 86 | const prBranch = "automated-dev-to-master-branch"; |
80 | | - const prTitle = "chore(dev):Promote `dev` to `master`"; |
| 87 | + const prTitle = "chore: release automated changes from dev to master"; |
81 | 88 | const prBody = process.env.PR_BODY; |
82 | 89 |
|
83 | 90 | // Retry helper function |
@@ -150,10 +157,28 @@ jobs: |
150 | 157 | if: ${{ github.ref == 'refs/heads/master' }} |
151 | 158 | runs-on: ubuntu-latest |
152 | 159 | steps: |
153 | | - - uses: googleapis/release-please-action@v4 |
| 160 | + - uses: googleapis/release-please-action@v3 |
154 | 161 | id: release |
155 | 162 | with: |
156 | 163 | release-type: simple |
| 164 | + include-v-in-tag: true |
| 165 | + package-name: hyde |
| 166 | + command: github-release |
| 167 | + token: ${{ secrets.GITHUB_TOKEN }} |
| 168 | + default-branch: master |
| 169 | + changelog-types: | |
| 170 | + [ |
| 171 | + {"type":"feat","section":"Features","hidden":false}, |
| 172 | + {"type":"fix","section":"Bug Fixes","hidden":false}, |
| 173 | + {"type":"docs","section":"Documentation","hidden":false}, |
| 174 | + {"type":"style","section":"Styles","hidden":false}, |
| 175 | + {"type":"refactor","section":"Code Refactoring","hidden":false}, |
| 176 | + {"type":"perf","section":"Performance Improvements","hidden":false}, |
| 177 | + {"type":"test","section":"Tests","hidden":false}, |
| 178 | + {"type":"build","section":"Build System","hidden":false}, |
| 179 | + {"type":"ci","section":"Continuous Integration","hidden":false}, |
| 180 | + {"type":"chore","section":"Miscellaneous Chores","hidden":true} |
| 181 | + ] |
157 | 182 | - uses: actions/checkout@v4 |
158 | 183 | - name: tag stable versions |
159 | 184 | if: ${{ steps.release.outputs.release_created }} |
|
0 commit comments