feat: created update change log file #12
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| on: | |
| push: | |
| tags: | |
| - "*" | |
| jobs: | |
| release: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Perform release | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 0 | |
| - name: Cocogitto release | |
| id: release | |
| uses: cocogitto/cocogitto-action@v3 | |
| with: | |
| release: true | |
| git-user: "Cog Bot" | |
| git-user-email: "mycoolproject@org.org" | |
| - name: Cocogitto Changelog Generation | |
| run: | | |
| VERSION=${GITHUB_REF#refs/tags/} | |
| echo "Generating changelog for $VERSION" | |
| cog changelog --at "$VERSION" -t full_hash > NEW_CHANGELOG.md | |
| - name: Prepend to CHANGELOG.md | |
| run: | | |
| cat NEW_CHANGELOG.md CHANGELOG.md > TEMP_CHANGELOG.md | |
| mv TEMP_CHANGELOG.md CHANGELOG.md | |
| - name: Commit updated CHANGELOG.md | |
| run: | | |
| git config user.name "Cog Bot" | |
| git config user.email "mycoolproject@org.org" | |
| git add CHANGELOG.md | |
| git commit -m "docs: update changelog for ${{ github.ref_name }}" | |
| git push origin HEAD:main | |
| - name: Upload GitHub Release | |
| uses: softprops/action-gh-release@v1 | |
| with: | |
| body_path: NEW_CHANGELOG.md | |
| tag_name: ${{ github.ref_name }} |