|
10 | 10 | env:
|
11 | 11 | external-doc-build: external_build
|
12 | 12 | internal-doc-build: internal_build
|
| 13 | + zip-doc-build: documents.zip |
13 | 14 |
|
14 | 15 | steps:
|
15 | 16 | - name: Accessing github project files
|
|
22 | 23 | env:
|
23 | 24 | EXTERNAL_DOC_BUILD: ${{ env.external-doc-build }}
|
24 | 25 | INTERNAL_DOC_BUILD: ${{ env.internal-doc-build }}
|
| 26 | + ZIP_DOC_BUILD: ${{ env.zip-doc-build }} |
| 27 | + |
| 28 | + - name: Get changes from CHANGELOG.md |
| 29 | + id: changelog_reader |
| 30 | + uses: mindsers/changelog-reader-action@v2 |
| 31 | + with: |
| 32 | + version: Unreleased |
| 33 | + |
| 34 | + - name: Generate release timestamp |
| 35 | + id: tag |
| 36 | + run: echo "::set-output name=date::$(date +'%Y-%m-%dT%H.%M.%S')" |
| 37 | + |
| 38 | + - name: Push a release tag |
| 39 | + id: push_tag |
| 40 | + uses: mathieudutour/[email protected] |
| 41 | + with: |
| 42 | + github_token: ${{ secrets.GH_TOKEN }} |
| 43 | + custom_tag: ${{ steps.tag.outputs.date }} |
| 44 | + |
| 45 | + - name: Create Release |
| 46 | + id: create_release |
| 47 | + |
| 48 | + env: |
| 49 | + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |
| 50 | + with: |
| 51 | + tag_name: v${{ steps.tag.outputs.date }} |
| 52 | + release_name: ${{ steps.tag.outputs.date }} |
| 53 | + body: ${{ steps.changelog_reader.outputs.changes }} |
| 54 | + prerelease: false |
| 55 | + draft: false |
| 56 | + |
| 57 | + - name: Upload Release Asset |
| 58 | + |
| 59 | + env: |
| 60 | + GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} |
| 61 | + with: |
| 62 | + upload_url: ${{ steps.create_release.outputs.upload_url }} |
| 63 | + asset_path: ./${{ env.zip-doc-build }} |
| 64 | + asset_name: ${{ env.zip-doc-build }} |
| 65 | + asset_content_type: application/zip |
| 66 | + |
| 67 | + - name: Update changelog |
| 68 | + uses: thomaseizinger/keep-a-changelog-new-release@v1 |
| 69 | + with: |
| 70 | + version: v${{ steps.tag.outputs.date }} |
| 71 | + |
| 72 | + - name: Commit changelog |
| 73 | + run: | |
| 74 | + git config user.name "GitHub actions" |
| 75 | + git config user.email [email protected] |
| 76 | + git add CHANGELOG.md |
| 77 | + git commit --message "Updating Changelog" |
| 78 | + echo "::set-output name=commit::$(git rev-parse HEAD)" |
| 79 | + git push |
25 | 80 |
|
26 | 81 | - name: Deploy external documentation
|
27 | 82 |
|
|
0 commit comments