mirror of
https://github.com/ButlerLogic/action-autotag.git
synced 2024-09-20 02:50:04 +07:00
41 lines
957 B
YAML
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
|