chore: updated consumer rules and improved release worklow #6
Workflow file for this run
This file contains 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
name: Post Release PR Merge | |
on: | |
pull_request: | |
types: [ closed ] | |
jobs: | |
release_merge: | |
if: github.head_ref == 'release/next' && github.event.pull_request.merged == true | |
runs-on: ubuntu-latest | |
steps: | |
- name: Git - Checkout | |
uses: actions/checkout@v4 | |
with: | |
ref: ${{ github.event.pull_request.head.sha }} | |
token: ${{ secrets.RELEASE_ACCESS_TOKEN }} | |
fetch-depth: 0 | |
- name: Install cz | |
run: pip install --user -U Commitizen | |
- name: Record previous version | |
run: | | |
echo "FROM_VERSION=$(git describe --tags $(git rev-list --tags --max-count=1))" >> $GITHUB_ENV | |
- name: Record release version | |
run: | | |
echo "RELEASE_VERSION=$(cz version --project)" >> $GITHUB_ENV | |
- name: Tag release | |
run: | | |
git tag $RELEASE_VERSION | |
git push origin $RELEASE_VERSION | |
- name: Record changelog for current release | |
run: cz changelog $FROM_VERSION..$RELEASE_VERSION --file-name="release.md" | |
- name: Create release | |
uses: ncipollo/release-action@v1 | |
with: | |
name: "Release ${{ env.RELEASE_VERSION }}" | |
tag: ${{ env.RELEASE_VERSION }} | |
bodyFile: "release.md" |