From 2efb3beaff0a2ba48bfcafd70ef4903477fa365b Mon Sep 17 00:00:00 2001 From: Danielo Rodriguez Date: Wed, 13 Sep 2023 10:56:06 +0200 Subject: [PATCH] chore: run sync version in a separate pipeline this way it will happens before the release PR is merged --- .github/workflows/release.yml | 3 --- .github/workflows/sync-version.yml | 21 +++++++++++++++++++++ 2 files changed, 21 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/sync-version.yml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 4cbed16b..5a59a18c 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -27,9 +27,6 @@ jobs: with: command: manifest token: ${{secrets.GITHUB_TOKEN}} - - name: Sync version with manifest and versions.json - run: node version-bump.mjs - - uses: stefanzweifel/git-auto-commit-action@v4 - name: Upload Release Assets if: ${{ steps.release.outputs.release_created }} env: diff --git a/.github/workflows/sync-version.yml b/.github/workflows/sync-version.yml new file mode 100644 index 00000000..7594c07b --- /dev/null +++ b/.github/workflows/sync-version.yml @@ -0,0 +1,21 @@ +# makes sure that all files have the required version information +# This only runs when the release-please action has labeled a release pull request +# so before it is merged, this ensures that all the files have the correct version +name: sync versions + +on: + pull_request: + types: [labeled] + +jobs: + build: + if: "${{ github.event.label.name == 'autorelease: pending' }}" + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Sync version with manifest and versions.json + run: node version-bump.mjs + - uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: "chore: sync versions"