|
41 | 41 | run: echo "value=${{ steps.semantic.outputs.new_release_version }}.rc${{ steps.build_number.outputs.value }}" >> $GITHUB_OUTPUT |
42 | 42 |
|
43 | 43 |
|
44 | | - docs-changelog: |
45 | | - if: needs.prepare.outputs.new_release == 'true' |
46 | | - name: Update changelog on docs |
47 | | - runs-on: ubuntu-22.04 |
48 | | - |
49 | | - needs: prepare |
50 | | - |
51 | | - steps: |
52 | | - - uses: actions/checkout@v4 |
53 | | - with: |
54 | | - fetch-depth: 0 |
55 | | - token: ${{ secrets.ACCESS_TOKEN }} |
56 | | - |
57 | | - - name: Calculate changelog path |
58 | | - id: path |
59 | | - run: echo "value=$(echo "${{ needs.prepare.outputs.release }}" | sed "s/\./_/g").md" >> $GITHUB_OUTPUT |
60 | | - |
61 | | - - name: Configure Git |
62 | | - run: | |
63 | | - git config user.email "azory@ydata.ai" |
64 | | - git config user.name "Azory YData Bot" |
65 | | - git config core.autocrlf false |
66 | | -
|
67 | | - - name: Write changelog to file |
68 | | - uses: DamianReeves/write-file-action@master |
69 | | - with: |
70 | | - path: docsrc/source/pages/reference/changelog/${{ steps.path.outputs.value }} |
71 | | - contents: ${{ needs.prepare.outputs.release_notes }} |
72 | | - write-mode: overwrite |
73 | | - |
74 | | - - name: Add changelog to docs |
75 | | - run: | |
76 | | - cd docsrc/source/pages/reference |
77 | | - sed -i -e 's/## \[.*/### Changelog ${{ needs.prepare.outputs.release }}/g' \ |
78 | | - -e 's/### Bug Fixes/#### 🐛 Bug fixes/g' \ |
79 | | - -e 's/### Features/#### 🎉 Features/g' \ |
80 | | - -e 's/### BREAKING CHANGES/#### 🚨 Breaking changes/g' \ |
81 | | - -e 's/### Documentation/#### 📖 Documentation/g' \ |
82 | | - changelog/${{ steps.path.outputs.value }} |
83 | | -
|
84 | | - grep -q ".. include:: changelog/${{ steps.path.outputs.value }}" changelog.rst || sed -i "4 a\\ |
85 | | - .. include:: changelog\/${{ steps.path.outputs.value }}\\ |
86 | | - :parser: myst_parser.sphinx_\\ |
87 | | -
|
88 | | - " changelog.rst |
89 | | -
|
90 | | - - name: Commit changelog |
91 | | - id: commit |
92 | | - run: | |
93 | | - if [[ `git status --porcelain` ]]; then |
94 | | - echo "CHANGES=true" >> $GITHUB_OUTPUT |
95 | | - git add docsrc/source/pages/reference/changelog/${{ steps.path.outputs.value }} |
96 | | - git commit -m "[skip ci] Update changelogs" -a |
97 | | - else |
98 | | - echo "CHANGES=false" >> $GITHUB_OUTPUT |
99 | | - fi |
100 | | -
|
101 | | - - name: Push changes |
102 | | - uses: ad-m/github-push-action@v0.6.0 |
103 | | - if: ${{ steps.commit.outputs.CHANGES == 'true' }} |
104 | | - with: |
105 | | - branch: ${{ github.ref }} |
106 | | - github_token: ${{ secrets.ACCESS_TOKEN }} |
107 | | - |
108 | | - |
109 | 44 | prerelease-tag: |
110 | 45 | if: needs.prepare.outputs.new_release == 'true' |
111 | 46 |
|
|
132 | 67 |
|
133 | 68 | needs: |
134 | 69 | - prepare |
135 | | - - docs-changelog |
136 | 70 |
|
137 | 71 | steps: |
138 | 72 | - name: Delete Previous drafts |
|
0 commit comments