Skip to content

fix: delete some paths #3

fix: delete some paths

fix: delete some paths #3

Workflow file for this run

# This workflow will run tests using node and then publish a package to GitHub Packages when a release is created
# For more information see: https://docs.github.com/en/actions/publishing-packages/publishing-nodejs-packages
name: Main
on:
push:
paths-ignore:
- "README.md"
- "CHANGELOG.md"
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
node: [19.7]
steps:
- uses: actions/checkout@v3
- name: Set up Node ${{ matrix.node }}
uses: actions/setup-node@v3
with:
node-version: ${{ matrix.node }}
# TODO: cache node packages
- name: Install Node Packages
run: npm install
- name: Check Code Format
run: npm run lint
# // TODO: https://www.pluralsight.com/guides/how-to-test-react-components-in-typescript
# - name: Test Code
# run: npm run test -- --watchAll=false
build:
needs: [test]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
- uses: actions/setup-node@v3
with:
node-version: 19.7
- name: Setup Git
run: |
git config --local user.name cfl-bot
git config --local user.email [email protected]
# TODO: cache node packages
- name: Install Node Packages
run: npm install --only=dev
- name: Build Package
run: npm run build
- name: Push Build Files
run: |
git add lib/*
if ! git diff --staged --quiet; then
git commit -m "push build files [skip ci]"
git push
fi
release:
needs: [build]
concurrency: release
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- uses: actions/checkout@v3
with:
token: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
fetch-depth: 0
- name: Pull Build Files
run: git pull
- uses: actions/setup-node@v3
with:
node-version: 19.7
# TODO: group release dependencies
- name: Install Node Packages
run: npm install --only=dev
- name: Publish Semantic Release
env:
GH_TOKEN: ${{ secrets.PERSONAL_ACCESS_TOKEN }}
run: npx semantic-release