Skip to content

force

force #452

Workflow file for this run

# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
name: Build & Lint
on:
workflow_dispatch:
pull_request:
push:
branches:
- next
- main
env:
NODE_VERSION: lts/*
jobs:
build-lint-ts:
name: Build & Lint Typescript
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: ⤵️ Checkout repository
uses: actions/checkout@v4.1.2
with:
ref: ${{ github.head_ref }}
- name: 🏗 Setup nodejs
uses: actions/setup-node@v4.0.2
with:
node-version: ${{ env.NODE_VERSION }}
- name: 🏗 Setup nodejs corepack
run: corepack enable
- name: 🏗 Get yarn config
id: yarn_config
run: echo "cache_folder=$(yarn config get cacheFolder)" >> $GITHUB_OUTPUT
- name: 🏗 Cache Layer
uses: actions/cache@v4.0.2
# id: yarn_cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
with:
path: ${{ steps.yarn_config.outputs.cache_folder }}
key: ${{ runner.os }}-yarn-${{ hashFiles('yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: 🏗 Install dependencies
run: yarn install --immutable
- name: 🚀 Build Typescript
run: yarn build
- name: 🚀 Format Typescript
run: yarn format
- name: 🚀 Run ESLint
run: yarn lint
- name: 🚀 Git Status
run: git status
- name: 'Import GPG key'
id: import-gpg
uses: crazy-max/ghaction-import-gpg@v6
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
passphrase: ${{ secrets.GPG_PASSPHRASE }}
git_user_signingkey: true
git_commit_gpgsign: true
- name: 'Commit and push changes'
uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_author: '${{ steps.import-gpg.outputs.name }} <${{ steps.import-gpg.outputs.email }}>'
commit_user_name: ${{ steps.import-gpg.outputs.name }}
commit_user_email: ${{ steps.import-gpg.outputs.email }}
commit_message: 'style(*): prettier & eslint auto format'
file_pattern: '**/*.ts'