Create automation for merging release
back to main
(#3235)
#1602
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check formatting | |
on: | |
pull_request: | |
push: | |
branches: | |
- main | |
- release | |
permissions: | |
contents: read | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
prettier: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
cache: "npm" | |
node-version: "22" | |
- name: Run Prettier | |
run: | | |
npm ci | |
npm run prettier:check | |
ormolu: | |
runs-on: ubuntu-latest | |
steps: | |
- run: | | |
git config --global core.autocrlf input | |
git config --global core.eol lf | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Parse oromolu version | |
working-directory: waspc | |
run: | | |
echo "ORMOLU_VERSION=$(grep 'ormolu ==' dev-tool.project | sed 's/.*==\s*\([0-9.]*\).*/\1/')" >> $GITHUB_ENV | |
# `run-ormolu` versions > 15 require ormolu version >= 0.7.5.0 | |
- uses: haskell-actions/run-ormolu@v15 | |
with: | |
version: ${{ env.ORMOLU_VERSION }} |