Delete --rebase option from /accept workflow

This commit is contained in:
lepapareil 2023-05-04 14:46:14 +02:00 committed by jcamiel
parent 55eea38007
commit 600e0e822c
No known key found for this signature in database
GPG Key ID: 07FF11CFD55356CC
2 changed files with 11 additions and 48 deletions

View File

@ -9,7 +9,7 @@ concurrency: accept-pull-request-${{ github.event.issue.number }}
jobs:
accept-pull-request:
if: ${{ github.event.issue.pull_request && (github.event.comment.body == '/accept' || github.event.comment.body == '/accept --force' || github.event.comment.body == '/accept --release') }}
if: ${{ github.event.issue.pull_request && (github.event.comment.body == '/accept' || github.event.comment.body == '/accept --force') }}
env:
GITHUB_CONTEXT: ${{ toJson(github) }}
GITHUB_TOKEN: ${{ secrets.HURL_BOT_TOKEN }}
@ -74,8 +74,6 @@ jobs:
run: |
if [[ "${{ github.event.comment.body }}" =~ "--force" ]] ; then
order="/accept --force"
elif [[ "${{ github.event.comment.body }}" =~ "--release" ]] ; then
order="/accept --release"
else
order="/accept"
fi
@ -195,8 +193,6 @@ jobs:
gh pr comment "${PR_NUMBER}" --body "${comment}"
if [[ "${{ github.event.comment.body }}" =~ "--force" ]] ; then
order="/accept --force"
elif [[ "${{ github.event.comment.body }}" =~ "--release" ]] ; then
order="/accept --release"
else
order="/accept"
fi
@ -292,39 +288,3 @@ jobs:
#gh pr comment "${PR_NUMBER}" --body "${comment} Please refer to ${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID} logs."
#exit 1
fi
- name: Release mode comment
if: contains(github.event.comment.body, '--release')
run: |
gh pr comment "${PR_NUMBER}" --body "🕗 As you used \`--release\` mode, a new PR will be created shortly to automatically update master branch to next ${{ steps.check-github-release.outputs.new_version_master_snapshot_version }} dev version"
update-branch-version:
needs:
- accept-pull-request
name: update-branch-version
if: needs.accept-pull-request.outputs.is_a_github_release_pr == 'true' && contains(github.event.comment.body, '--release')
uses: ./.github/workflows/update-branch-version.yml
with:
new_version: ${{ needs.accept-pull-request.outputs.new_version_master_snapshot_version }}
branch: ${{ needs.accept-pull-request.outputs.base_ref }}
secrets: inherit
release-final-comment:
if: contains(github.event.comment.body, '--release')
needs:
- accept-pull-request
- update-branch-version
env:
GITHUB_TOKEN: ${{ secrets.HURL_BOT_TOKEN }}
name: release-final-comment
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
ref: ${{ env.BASE_REF }}
fetch-depth: 0
- name: release-final-comment
run: |
gh pr comment "${{ github.event.issue.number }}" --body "✅ New PR [${{ needs.update-branch-version.outputs.pr_number }}](${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}/pull/${{ needs.update-branch-version.outputs.pr_number }}) created to update master branch to ${{ needs.accept-pull-request.outputs.new_version_master_snapshot_version }} version"

View File

@ -15,18 +15,21 @@ We always have to start with current version x.y.0-snapshot (in all Cargo.toml).
- Clean pending release
- Create new `release/x.y.0` branch
- Checkout this new branch
- Update all toml with `x.y.0`
- Update all crate with `x.y.0`
- Update man and docs with `x.y.0`
- Update all toml, crates, man and docs with `x.y.0`
- Generate CHANGELOG
- Commit all updates
- Create the `x.y.0` tag
- Create draft GitHub release `x.y.0`
- Create PR from `release/x.y.0` to `master`
- Publish the draft release
- Accept the PR with `/accept --release`, it will:
- Merge fast-forward this PR
- Open a new one to update `master` files to next version `x.y+1.0-SNAPSHOT`
- Accept the PR from `release/x.y.0` to `master` with `/accept`
- Run `update-branch-version.yml` workflow on `master` branch, filling in the `desired SNAPSHOT version`, it will:
- Create `bot/update-branch-version-master` branch
- Checkout this new branch
- Update all toml, crates, and man with `desired SNAPSHOT version`
- Commit all updates
- Create PR from `bot/update-branch-version-master` to `master`
- Accept the PR from `bot/update-branch-version-master` to `master` with `/accept`
## Hotfix steps
@ -43,7 +46,7 @@ We always have to start with current version x.y.0-snapshot (in all Cargo.toml).
- Create the `x.y.z` tag
- Create draft GitHub release `x.y.z`
- Create PR from `release/x.y.z` to `master`
- You have to manually `merge` as a revert rebase to reorder commits between this new hotfix and master
- You have to manually `merge` as a revert rebase to reorder commits between this new hotfix and master
- Run `update-branch-version.yml` workflow on `master` to restore actual dev version to `x.y+1.0-SNAPSHOT`, for example from `1.8.1` to `1.9.0-SNAPSHOT`
## Additional