Add build workflows

This commit is contained in:
Federico Grandi
2019-12-10 21:00:28 +01:00
parent 463ebc38cb
commit 5277b29cf2
2 changed files with 72 additions and 0 deletions

36
.github/workflows/build-release.yml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: Build & release
on:
push:
branches:
- releases/**
jobs:
build:
name: Build compiled JS version
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Set up Node.js
uses: actions/setup-node@master
with:
node-version: 12.0.0
- name: Install dependencies
run: npm install
- name: Compile TypeScript into compressed JavaScript
run: npm run build
- name: Commit changes
uses: EndBug/add-and-commit@v2.1.0
with:
author_name: Federico Grandi
author_email: fgrandi30@gmail.com
force: true
message: "[auto] Commit release files"
path: "."
pattern: "*.*"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

36
.github/workflows/build.yml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: Build
on:
push:
branches-ignore:
- releases/**
jobs:
build:
name: Build compiled JS version
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@master
- name: Set up Node.js
uses: actions/setup-node@master
with:
node-version: 12.0.0
- name: Install dependencies
run: npm install
- name: Compile TypeScript into compressed JavaScript
run: npm run build
- name: Commit changes
uses: EndBug/add-and-commit@v2.1.0
with:
author_name: Federico Grandi
author_email: fgrandi30@gmail.com
force: true
message: "[auto] Update compiled version"
path: lib
pattern: "*.js"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}