fix: Disable @trivago/prettier-plugin-sort-imports temporarily (#142) #95
This file contains 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: π§ͺ Test and π Release | |
on: | |
push: | |
branches: | |
- main | |
- beta | |
pull_request: {} | |
workflow_dispatch: {} | |
concurrency: | |
group: ${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
test-and-release: | |
runs-on: ubuntu-latest | |
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }} | |
strategy: | |
matrix: | |
node-version: [18.x, 20.x] | |
steps: | |
- name: β¬οΈ Checkout repo | |
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # pin@main | |
- name: β Setup node | |
uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65 # pin@main | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: "npm" | |
- name: π Cache node_modules | |
id: cache-node_modules | |
uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 # pin@main | |
with: | |
path: "**/node_modules" | |
key: node_modules-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }} | |
- name: π₯ Install dependencies | |
if: steps.cache-node_modules.outputs.cache-hit != 'true' | |
run: | | |
npm ci --ignore-scripts | |
- name: π§ͺ Test | |
run: | | |
npm test | |
env: | |
CI: true | |
- name: π Release on npm | |
if: ${{ contains(' refs/heads/main refs/heads/beta ', github.ref) && matrix.node-version == '20.x' }} | |
env: | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
npm run release |