Description
Release-Please automates CHANGELOG generation, Github releases, and version bumps. Using standardized commit messages following conventional-commit, a release-please github action workflow will generate PR's and tags when new features and fixes are committed to specified branches.
Links
Release-Please documentation
Conventional Commits documentation
#266 Create Unit Tests/File Restructuring for maap-documentation-examples Repository
Example
A straightforward workflow to generate tags for major.minor.patch versions as well as updated the CHANGELOG and README.
release-main.yml
on:
push:
branches:
- main
name: release-please
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: google-github-actions/release-please-action@v3
with:
release-type: node
package-name: release-please-action
changelog-types: '
[
{"type":"feat","section":"Features","hidden":false},
{"type":"fix","section":"Bug Fixes","hidden":false},
{"type":"chore","section":"Miscellaneous","hidden":false}
]'
extra-files: |
README.md
- uses: actions/checkout@v2
- name: tag major and minor versions
if: ${{ steps.release.outputs.release_created }}
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git remote add gh-token "https://${{ secrets.GITHUB_TOKEN }}@github.com/google-github-actions/release-please-action.git"
git tag -d v${{ steps.release.outputs.major }} || true
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git tag -d v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} || true
git push origin :v${{ steps.release.outputs.major }} || true
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} || true
git push origin :v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} || true
git tag -a v${{ steps.release.outputs.major }} -m "Release v${{ steps.release.outputs.major }}"
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}"
git tag -a v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }} -m "Release v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}"
git push origin v${{ steps.release.outputs.major }}
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}
git push origin v${{ steps.release.outputs.major }}.${{ steps.release.outputs.minor }}.${{ steps.release.outputs.patch }}
Conventional commit message example
fix: Fix for unresolved file path. Bumps Version 0.0.1
Acceptance Criteria
Description
Release-Please automates CHANGELOG generation, Github releases, and version bumps. Using standardized commit messages following conventional-commit, a release-please github action workflow will generate PR's and tags when new features and fixes are committed to specified branches.
Links
Release-Please documentation
Conventional Commits documentation
#266 Create Unit Tests/File Restructuring for maap-documentation-examples Repository
Example
A straightforward workflow to generate tags for major.minor.patch versions as well as updated the CHANGELOG and README.
release-main.yml
Conventional commit message example
Acceptance Criteria