Actualizar configuración de ESLint, Babel y PostCSS y añadir generado… #13
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: Build and Lint | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
lint-and-build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: "20" | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Cache Node Modules | |
uses: actions/cache@v3 | |
with: | |
path: node_modules | |
key: ${{ runner.os }}-node-modules-${{ hashFiles('**/package-lock.json') }}-v2 | |
restore-keys: | | |
${{ runner.os }}-node-modules- | |
- name: Install Dependencies | |
run: npm install | |
- name: Build | |
run: npm run build | |
- name: Audit Dependencies | |
run: npm audit --audit-level=high | |
- name: Run ESLint | |
run: npm run lint | |
- name: "✏️ Generate release changelog" | |
uses: janheinrichmerker/action-github-changelog-generator@v2.4 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Commit and Push Changelog | |
run: | | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
git add CHANGELOG.md | |
git commit -m "🔖 Update changelog for release" | |
git push origin main |