Files
archived-tauri-docs/.github/workflows/format.yml
Lorenzo Lewis 341b49cd68 Add Prettier formatting (#1360)
* add prettier

Signed-off-by: Lorenzo Lewis <lorenzo_lewis@icloud.com>

* add prettier script

Signed-off-by: Lorenzo Lewis <lorenzo_lewis@icloud.com>

* add prettier configs

Signed-off-by: Lorenzo Lewis <lorenzo_lewis@icloud.com>

* add git modules to ignore

Signed-off-by: Lorenzo Lewis <lorenzo_lewis@icloud.com>

* ignore formatting autogenerated references

Signed-off-by: Lorenzo Lewis <lorenzo_lewis@icloud.com>

* format

Signed-off-by: Lorenzo Lewis <lorenzo_lewis@icloud.com>

* add format workflow for testing

Signed-off-by: Lorenzo Lewis <lorenzo_lewis@icloud.com>

* set package manager

Signed-off-by: Lorenzo Lewis <lorenzo_lewis@icloud.com>

* valid package manager?

Signed-off-by: Lorenzo Lewis <lorenzo_lewis@icloud.com>

* test applying formatting

Signed-off-by: Lorenzo Lewis <lorenzo_lewis@icloud.com>

* [ci] format

* update action target branch

Signed-off-by: Lorenzo Lewis <lorenzo_lewis@icloud.com>

* line break

Signed-off-by: Lorenzo Lewis <lorenzo_lewis@icloud.com>

---------

Signed-off-by: Lorenzo Lewis <lorenzo_lewis@icloud.com>
Co-authored-by: lorenzolewis <lorenzolewis@users.noreply.github.com>
2023-08-05 12:07:14 +01:00

35 lines
904 B
YAML

# Adapted from https://github.com/withastro/starlight/blob/main/.github/workflows/format.yml
name: Format
on:
push:
branches:
- next
jobs:
format:
runs-on: ubuntu-latest
steps:
- name: Check out code using Git
uses: actions/checkout@v3
with:
ref: ${{ github.head_ref }}
# Needs access to push to main
token: ${{ secrets.ORG_TAURI_BOT_PAT }}
- uses: pnpm/action-setup@v2
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'pnpm'
- run: pnpm i
- name: Format with Prettier
run: pnpm format
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: '[ci] format'
branch: ${{ github.head_ref }}
commit_user_name: fredkbot
commit_user_email: fred+astrobot@astro.build