From 5ba682f9a7990f05a8dc79681cc8ca7a53ed8750 Mon Sep 17 00:00:00 2001 From: sripwoud Date: Tue, 23 Jul 2024 15:22:46 +0200 Subject: [PATCH] ci: format files edited by `release-plz` (#39) --- .github/workflows/release.yml | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 78e63c1..c9e9f46 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -5,7 +5,6 @@ permissions: on: push: branches: [main] - workflow_dispatch: jobs: release: @@ -18,7 +17,21 @@ jobs: - name: Install rust toolchain uses: dtolnay/rust-toolchain@stable - name: Run release-plz + id: release-plz uses: MarcoIeni/release-plz-action@v0.5 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} + + - uses: fregante/setup-git-user@v2.0.1 + - name: install dprint + run: curl -fsSL https://dprint.dev/install.sh | sh -s 0.47.2 > /dev/null 2>&1 + + - name: fmt + run: | + pr_branch="${{ fromJSON(steps.release-plz.outputs.pr).head_branch }}" + git pull + git checkout "$pr_branch" + $HOME/.dprint/bin/dprint fmt + git commit -am 'chore: format files' + git push origin "$pr_branch"