mirror of
https://github.com/ButlerLogic/action-autotag.git
synced 2024-11-22 08:11:07 +07:00
Preparations for v2 (#42)
* Add build process and cleanup old distro files * Updated build process to produce node_modules * Fix caching. * Rename action * Add master to deployment action * Add master to deployment action * Trigger build on any branch push * Add token for automatic commits during build process
This commit is contained in:
parent
80d7827f03
commit
c47fa43261
40
.github/workflows/build.yml
vendored
Normal file
40
.github/workflows/build.yml
vendored
Normal file
@ -0,0 +1,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 "actions@github.com"
|
||||
git config --global user.name "GitHub Actions"
|
||||
git add .
|
||||
git commit -m "Build distribution files"
|
||||
git push
|
1
.gitignore
vendored
1
.gitignore
vendored
@ -8,3 +8,4 @@ logs
|
||||
_*
|
||||
node_modules
|
||||
!./src/node_modules
|
||||
dist
|
||||
|
21400
dist/main.js
vendored
21400
dist/main.js
vendored
File diff suppressed because one or more lines are too long
@ -14,7 +14,7 @@
|
||||
},
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1",
|
||||
"prepare": "esbuild --bundle ./src/main.js --platform=node --outdir=dist"
|
||||
"prepare": "esbuild --bundle ./src/main.js --platform=node --outdir=dist --external:octokit"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
|
Loading…
Reference in New Issue
Block a user