From a98fea895179d07062b12a06e1b67a157379e576 Mon Sep 17 00:00:00 2001 From: Dorian <dorian@loxo.ch> Date: Thu, 7 Dec 2023 09:15:37 +0100 Subject: [PATCH 1/2] feat: use force push --- ...ly-allow-pull-requests-to-master-from-develop.yml | 3 --- .github/workflows/version-bump-master.yml | 12 ++++++++---- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/.github/workflows/only-allow-pull-requests-to-master-from-develop.yml b/.github/workflows/only-allow-pull-requests-to-master-from-develop.yml index ba0eff9..20385bf 100644 --- a/.github/workflows/only-allow-pull-requests-to-master-from-develop.yml +++ b/.github/workflows/only-allow-pull-requests-to-master-from-develop.yml @@ -19,9 +19,6 @@ jobs: if [ "${{github.head_ref}}" == "develop" ]; then echo Pull request is from develop ✔ exit 0 - elif [ "${{github.head_ref}}" == "master" ]; then - echo Pull request is from master ✔ - exit 0 else echo Pull requests from ${{github.head_ref}} are not allowed. Only pull requests from develop are allowed. fi diff --git a/.github/workflows/version-bump-master.yml b/.github/workflows/version-bump-master.yml index b2197e4..a08b385 100644 --- a/.github/workflows/version-bump-master.yml +++ b/.github/workflows/version-bump-master.yml @@ -8,8 +8,8 @@ on: jobs: bump-minor-version-on-master: - if: github.event.pull_request.merged == true name: Bump the version on master + if: github.event.pull_request.merged == true permissions: contents: write @@ -27,15 +27,19 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: - token: ${{ secrets.VERSION_BUMPER_PAT }} + skip-push: true # skip push so that we can force push version-type: 'minor' target-branch: 'master' commit-message: 'CI: bumped version to {{version}} because a pull request was merged into master' + - name: force-push + run: + git push origin master --force + merge-master-into-develop: - needs: bump-minor-version-on-master # has to be run after version has been bumped - if: github.event.pull_request.merged == true name: Merge master into develop + needs: bump-minor-version-on-master # has to be run after the push to master + if: github.event.pull_request.merged == true permissions: contents: write From f6da63379535b8ea1fb893865b929e9a27f37c40 Mon Sep 17 00:00:00 2001 From: Automated Version Bump <gh-action-bump-version@users.noreply.github.com> Date: Thu, 7 Dec 2023 08:16:25 +0000 Subject: [PATCH 2/2] CI: bumped version to 0.16.11 because a pull request was merged into develop --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index cfd6a6b..09be636 100644 --- a/package.json +++ b/package.json @@ -1,3 +1,3 @@ { - "version": "0.16.10" + "version": "0.16.11" }