Change how formatting errors is done #67
Workflow file for this run
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: Main CI | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
env: | |
pnpm-version: 8 | |
node-version: 20 | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
concurrency: ${{ github.workflow }}-${{ github.ref }} | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
if: ${{ !contains(github.head_ref, 'changeset-release') }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache pnpm modules | |
uses: actions/cache@v3.3.2 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2.4.0 | |
with: | |
version: ${{ env.pnpm-version }} | |
- uses: actions/setup-node@v4.0.0 | |
with: | |
node-version: ${{ env.node-version }} | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Compile | |
run: pnpm compile | |
- name: Test | |
run: pnpm test | |
- name: Bundle | |
run: pnpm bundle | |
release: | |
needs: build | |
runs-on: ubuntu-latest | |
if: github.ref == 'refs/heads/main' | |
permissions: | |
contents: write | |
issues: write | |
pull-requests: write | |
packages: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache pnpm modules | |
uses: actions/cache@v3.3.2 | |
with: | |
path: ~/.pnpm-store | |
key: ${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }} | |
restore-keys: | | |
${{ runner.os }}- | |
- name: Install pnpm | |
uses: pnpm/action-setup@v2.4.0 | |
with: | |
version: ${{ env.pnpm-version }} | |
- uses: actions/setup-node@v4.0.0 | |
with: | |
node-version: ${{ env.node-version }} | |
cache: pnpm | |
- name: Install dependencies | |
run: pnpm install | |
- name: Create Release Pull Request or Publish to npm | |
id: changesets | |
uses: changesets/action@v1 | |
with: | |
publish: pnpm release | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |