autotag/.github/workflows/build.yml
Corey Butler 0df3a117ad
Add deps
2024-03-11 16:38:33 -05:00

41 lines
957 B
YAML

name: Create Action
on:
push:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Prepare Dependency Cache
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-
- name: Install Dependencies
run: npm install
- name: Build
run: |
rm -rf ./dist
npm run prepare
cp ./src/package.json ./dist/
cd ./dist
mkdir -p ./node_modules
npm i
- name: Commit Build Artifacts
env:
GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git add .
git commit -m "Build distribution files"
git push