generated from actions/typescript-action
-
-
Notifications
You must be signed in to change notification settings - Fork 47
40 lines (37 loc) · 957 Bytes
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: Create Action
on:
push:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Prepare Dependency Cache
uses: actions/cache@v2
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 "[email protected]"
git config --global user.name "GitHub Actions"
git add .
git commit -m "Build distribution files"
git push