Skip to content

dev -> main

dev -> main #11

Workflow file for this run

name: auto-format
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number }}
cancel-in-progress: true
on:
pull_request:
types:
- opened
- reopened
- ready_for_review
- synchronize
- unlocked
jobs:
perform-checks:
if: |
github.repository == github.event.pull_request.head.repo.full_name
&& github.event.pull_request.draft == false
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v4
- uses: ok-nick/setup-aftman@v0.4.2
with:
cache: true
- name: Lint
run: selene src
- name: Ensure version parity
run: lune run ensure-version-parity
- name: Ensure version has changed
run: |
current_version=$(jq -r .version package.json)
previous_version=$(git show origin/main:package.json | jq -r .version)
if [ "$current_version" == "$previous_version" ]; then
echo "Version has not changed"
exit 1
fi
- name: Ensure tests exist
run: lune run ensure-tests src
format:
needs: perform-checks
runs-on: ubuntu-latest
timeout-minutes: 10
permissions:
contents: write
steps:
- uses: actions/checkout@v4
- uses: ok-nick/setup-aftman@v0.4.2
with:
cache: true
- name: Format files
run: lune run format-files src
- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "Auto-format files"