From a0c55ecea441620ee7660bf6c1dc4dfabbd6cf03 Mon Sep 17 00:00:00 2001 From: Steven Giesel Date: Sun, 14 Sep 2025 20:28:59 +0200 Subject: [PATCH] fix: Update workflow for v1 --- .github/workflows/ci.yml | 2 +- .github/workflows/docs-deploy.yml | 30 ++++----------------------- .github/workflows/prepare-release.yml | 2 +- .github/workflows/release.yml | 26 ++--------------------- 4 files changed, 8 insertions(+), 52 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1b5c93a45..d822a84ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -4,7 +4,7 @@ on: push: branches: - main - - v2 + - v1 paths: - 'src/**' - 'tests/**' diff --git a/.github/workflows/docs-deploy.yml b/.github/workflows/docs-deploy.yml index 1bf98486a..6785a2cfa 100644 --- a/.github/workflows/docs-deploy.yml +++ b/.github/workflows/docs-deploy.yml @@ -4,12 +4,12 @@ concurrency: "docs-deploy" on: push: branches: - - stable + - v1 paths: - 'docs/**' workflow_run: - branches: [ main ] + branches: [ v1 ] workflows: [ 'release' ] types: [ completed ] @@ -25,7 +25,7 @@ env: jobs: deploy: name: 📃 Deploy new version bunit.dev - if: github.ref == 'refs/heads/stable' || ${{ github.event.workflow_run.conclusion == 'success' }} + if: github.ref == 'refs/heads/v1' || ${{ github.event.workflow_run.conclusion == 'success' }} runs-on: ubuntu-latest steps: @@ -100,7 +100,7 @@ jobs: with: build_dir: docs/site/_site fqdn: bunit.dev - repo: bUnit-dev/bUnit-dev.github.io + repo: bUnit-dev/v1.bunit.dev target_branch: main keep_history: false jekyll: false @@ -108,25 +108,3 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} GH_PAT: ${{ secrets.BUNIT_BOT_TOKEN }} - - - name: ⏩ Merge stable with main, push origin - id: mergeMainline - continue-on-error: true - run: | - git checkout main - git merge -S stable - git push origin main - - - name: ⏭ Create pull request from stable to main when direct merge fails - if: steps.mergeMainline.outcome == 'failure' - uses: thomaseizinger/create-pull-request@1.4.0 - with: - github_token: ${{ secrets.BUNIT_BOT_TOKEN }} - head: stable - base: main - title: Update main with documentation in stable - reviewers: ${{ github.actor }} # By default, we request a review from the person who triggered the workflow. - body: | - Hi @${{ github.actor }} - - This PR was created because the [docs-deploy](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) failed to automatically merge stable into main. diff --git a/.github/workflows/prepare-release.yml b/.github/workflows/prepare-release.yml index 5b48c8c0f..29d40522b 100644 --- a/.github/workflows/prepare-release.yml +++ b/.github/workflows/prepare-release.yml @@ -13,7 +13,7 @@ jobs: prepare-release: name: 🚚 Prepare new release runs-on: ubuntu-latest - if: github.ref == 'refs/heads/main' && contains(fromJson('["major","minor"]'), github.event.inputs.versionIncrement) + if: github.ref == 'refs/heads/v1' && contains(fromJson('["major","minor"]'), github.event.inputs.versionIncrement) steps: - name: 🛒 Checkout repository uses: actions/checkout@v4 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index c4b9027e6..30df6abbb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -4,7 +4,7 @@ concurrency: 'release' on: pull_request: branches: - - stable + - v1 types: - closed paths-ignore: @@ -23,7 +23,7 @@ jobs: release: name: 🎁 Publish new release # Only run on manual dispatch or on merged 'release-' pull requests - if: github.ref == 'refs/heads/stable' || + if: github.ref == 'refs/heads/v1' || github.event.pull_request.merged == true && contains(github.head_ref, 'release/v') == true runs-on: ubuntu-latest steps: @@ -117,25 +117,3 @@ jobs: draft: false prerelease: ${{ steps.nbgv.outputs.PublicRelease == 'False' }} github_token: ${{ secrets.GITHUB_TOKEN }} - - - name: ⏩ Merge stable with main, push to origin - id: mergeMainline - continue-on-error: true - run: | - git checkout main - git merge -S stable - git push origin main - - - name: ⏭ Create pull request from stable to main when direct merge fails - if: steps.mergeMainline.outcome == 'failure' - uses: thomaseizinger/create-pull-request@1.4.0 - with: - github_token: ${{ secrets.BUNIT_BOT_TOKEN }} - head: stable - base: main - title: Update main with changes in stable after v${{ steps.nbgv.outputs.SemVer2 }} release - reviewers: ${{ github.actor }} # By default, we request a review from the person who triggered the workflow. - body: | - Hi @${{ github.actor }} - - This PR was created because the [release workflow](https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}) failed to automatically merge stable into main.