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"