release 3.3.0 (previous release 3.2.0) #41
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
# Bump version with Commitizen | |
name: π Bump version | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
bump_version: | |
name: π Bump and changelog | |
runs-on: ubuntu-latest | |
if: contains(github.event.head_commit.message, 'Merge') | |
environment: | |
name: release | |
url: https://github.com/Michele-Alberti/data-lunch/tags | |
outputs: | |
version: ${{ steps.cz.outputs.version }} | |
steps: | |
- name: Set pre-release | |
id: vars | |
env: | |
TITLE: ${{ github.event.pull_request.title }} | |
run: | | |
pre_release=$(awk -F'[][]' '{print $2}' <<< "$TITLE") | |
echo "pre_release=$pre_release" >> $GITHUB_OUTPUT | |
echo "pre-release: $pre_release" | |
- name: Check out | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | |
- name: Bump and changelog | |
id: cz | |
uses: commitizen-tools/commitizen-action@0.21.0 | |
with: | |
github_token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | |
prerelease: "${{ steps.vars.outputs.pre_release }}" | |
- name: Print version | |
run: echo "Bumped to version ${{ steps.cz.outputs.version }}" | |
merge_back_to_dev: | |
name: π Merge back | |
needs: bump_version | |
runs-on: ubuntu-latest | |
environment: | |
name: release | |
url: https://github.com/Michele-Alberti/data-lunch/commits/development | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
ref: main | |
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }} | |
- name: Set Git config | |
run: | | |
git config --local user.name "github-actions[bot]" | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
- name: Merge master back to dev | |
run: | | |
git checkout development | |
git merge --no-ff main -m "Merge branch 'main' into development" | |
git push |