Skip to content

Call empty only on incomplete orders #725

Call empty only on incomplete orders

Call empty only on incomplete orders #725

name: "Prepare post-release"
on:
workflow_dispatch:
pull_request:
branches:
- main
- v*
types:
- closed
jobs:
prepare:
runs-on: ubuntu-latest
env:
BUNDLE_ONLY: "release"
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
if: |
(github.event_name == 'workflow_dispatch') || (
github.event.pull_request.merged == true &&
contains(github.event.pull_request.labels.*.name, 'release:generate')
)
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: "3.2"
bundler-cache: true
- id: pipeline_context
uses: ./.github/actions/extract_pipeline_context
with:
last_minor: ${{ contains(github.event.pull_request.labels.*.name, 'release:generate-last_minor') }}
- name: "Bump to the development version"
run: |
bin/release/bump-version \
${{ steps.pipeline_context.outputs.next_candidate_dev_version }}
- name: "Bump previous solidus minor version"
if: github.ref_name == 'main'
run: |
bin/release/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: |
bin/release/bump-docker-image-version \
${{ steps.pipeline_context.outputs.next_candidate_dev_version }}
- name: "Bump installer starter frontend version"
if: github.ref_name == 'main'
run: |
bin/release/bump-starter-frontend-version \
main
- name: "Publish release draft & tag last commit"
run: |
bin/release/publish-release \
${{ 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
bin/release/bump-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.