Skip to content

[v4.2] Redefine the release task skipping tag creation #350

[v4.2] Redefine the release task skipping tag creation

[v4.2] Redefine the release task skipping tag creation #350

name: "Prepare post-release"
on:
pull_request:
branches:
- main
- v*
types:
- closed
jobs:
prepare:
runs-on: ubuntu-latest
if: |
github.event.pull_request.merged == true &&
contains(github.event.pull_request.labels.*.name, 'release:generate')
steps:
- uses: actions/checkout@v3
- id: pipeline_context
uses: ./.github/actions/extract_pipeline_context
with:
last_minor: ${{ contains(github.event.pull_request.labels.*.name, 'release:generate-last_minor') }}
- uses: ruby/setup-ruby@v1
env:
BUNDLE_GEMFILE: "dev_tools/Gemfile"
with:
ruby-version: "3.1"
bundler-cache: true
- name: "Bump to the development version"
run: |
cd dev_tools/ && bin/bump-to-dev-version \
${{ steps.pipeline_context.outputs.next_candidate_dev_version }}
- name: "Bump previous solidus minor version"
if: github.ref_name == 'main'
run: |
cd dev_tools/ && bin/bump-previous-minor-version \
${{ steps.pipeline_context.outputs.candidate_minor_version }}
- name: "Bump to the development version in docker-compose"
if: github.ref_name == 'main'
run: |
cd dev_tools/ && bin/bump-docker-image-to-dev-version \
${{ steps.pipeline_context.outputs.next_candidate_dev_version }}
- name: "Bump installer starter frontend version"
if: github.ref_name == 'main'
run: |
cd dev_tools/ && bin/bump-starter-frontend-version \
main
- name: "Publish release draft & tag last commit"
run: |
cd dev_tools/ && bin/publish-release \
${{ github.token }} \
${{ github.repository }} \
${{ steps.pipeline_context.outputs.candidate_tag }}
- name: "Create backport label"
if: github.ref_name == 'main'
env:
GH_TOKEN: ${{ github.token }}
run: |
gh label create \
backport-${{ steps.pipeline_context.outputs.candidate_patch_branch }} \
--description "Backport this pull-request to ${{ steps.pipeline_context.outputs.candidate_patch_branch }}" \
--color 3E4538
- name: "Create patch branch"
if: github.ref_name == 'main'
env:
GH_TOKEN: ${{ github.token }}
run: |
candidate_patch_branch="${{ steps.pipeline_context.outputs.candidate_patch_branch }}"
git checkout -b $candidate_patch_branch
git push --set-upstream origin $candidate_patch_branch
- name: "Create PR for main"
uses: ./.github/actions/commit_and_submit_pull_request
with:
labels: changelog:skip
message: |
Post-release chores after having released Solidus ${{ steps.pipeline_context.outputs.candidate_tag }}
This code has been automatically generated by our 'Prepare post-release' GitHub
action.
Make sure that:
- [ ] The new release has been published, along with its tag. See https://github.com/${{ github.repository }}/releases/tag/${{ steps.pipeline_context.outputs.candidate_tag }}
- [ ] The corresponding patch branch exists. See https://github.com/${{ github.repository }}/tree/${{ steps.pipeline_context.outputs.candidate_patch_branch }}
- [ ] The corresponding backport-${{ steps.pipeline_context.outputs.candidate_patch_branch }} label exists. See https://github.com/${{ github.repository }}/labels
- name: "Bump to the development version in the patch branch"
if: github.ref_name == 'main'
env:
GH_TOKEN: ${{ github.token }}
run: |
candidate_patch_branch="${{ steps.pipeline_context.outputs.candidate_patch_branch }}"
git checkout $candidate_patch_branch
cd dev_tools/ && bin/bump-patch-to-dev-version \
${{ steps.pipeline_context.outputs.candidate_next_patch_dev_version }}
- name: "Create PR for the patch branch"
if: github.ref_name == 'main'
uses: ./.github/actions/commit_and_submit_pull_request
with:
labels: changelog:skip
base: ${{ steps.pipeline_context.outputs.candidate_patch_branch }}
message: |
Post-creation chores after new ${{ steps.pipeline_context.outputs.candidate_patch_branch }} patch branch
This is part of the release process for Solidus ${{ steps.pipeline_context.outputs.candidate_tag }}.
This code has been automatically generated by our 'Prepare post-release' GitHub
action.