|
10 | 10 | CARGO_TERM_COLOR: always |
11 | 11 | RUST_BACKTRACE: 1 |
12 | 12 | PROJECT_NAME: csv_parser_rs |
| 13 | + DOCS_BODY: "${{ github.event.release.body }}" |
13 | 14 | jobs: |
14 | 15 | docs: |
15 | 16 | name: "Docs - docs" |
@@ -129,3 +130,40 @@ jobs: |
129 | 130 | if-no-files-found: 'error' |
130 | 131 | compression-level: '9' |
131 | 132 | overwrite: 'true' |
| 133 | + publish-docs: |
| 134 | + name: "Docs - publish-docs" |
| 135 | + permissions: |
| 136 | + contents: write |
| 137 | + runs-on: ubuntu-latest |
| 138 | + needs: [package-docs-unix, package-docs-windows] |
| 139 | + steps: |
| 140 | + - run: | |
| 141 | + echo 'DOCS_BODY<<EOF' >> $GITHUB_ENV |
| 142 | + echo "From commit: ${GITHUB_SHA:0:8}" >> $GITHUB_ENV |
| 143 | + echo "Generated on: $(date -u +"%Y-%m-%d %H:%M") UTC" >> $GITHUB_ENV |
| 144 | + echo "EOF" >> $GITHUB_ENV |
| 145 | + - name: "Checkout sources" |
| 146 | + uses: actions/checkout@v4 |
| 147 | + - uses: actions/download-artifact@v4 |
| 148 | + id: artifact-download-step |
| 149 | + with: |
| 150 | + merge-multiple: true |
| 151 | + - name: "Update tag for docs" |
| 152 | + run: | |
| 153 | + git config user.name "github-actions[bot]" |
| 154 | + git config user.email "41898282+github-actions[bot]@users.noreply.github.com" |
| 155 | + git tag --force docs && git push --force origin tag docs |
| 156 | + - name: "Docs - draft" |
| 157 | + uses: softprops/action-gh-release@master |
| 158 | + with: |
| 159 | + tag_name: "[${{ github.ref_name }} Docs]" |
| 160 | + # repository: ${{ github.repository }} |
| 161 | + fail_on_unmatched_files: true |
| 162 | + draft: true |
| 163 | + files: | |
| 164 | + ${{ env.PROJECT_NAME }}-* |
| 165 | + name: "[${{ github.ref_name }} Docs]" |
| 166 | + body: ${{ env.DOCS_BODY }} |
| 167 | + target_commitish: ${{ github.sha }} |
| 168 | + generate_release_notes: false |
| 169 | + # body_path: ${{ github.workspace }}-CHANGELOG.txt ## For adding changelog content |
0 commit comments