From 5277b29cf2149b1f4b28202cf84ab1dbb1b8b30f Mon Sep 17 00:00:00 2001 From: Federico Grandi Date: Tue, 10 Dec 2019 21:00:28 +0100 Subject: [PATCH] Add build workflows --- .github/workflows/build-release.yml | 36 +++++++++++++++++++++++++++++ .github/workflows/build.yml | 36 +++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+) create mode 100644 .github/workflows/build-release.yml create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build-release.yml b/.github/workflows/build-release.yml new file mode 100644 index 0000000..f2b66be --- /dev/null +++ b/.github/workflows/build-release.yml @@ -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 }} diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..e46f063 --- /dev/null +++ b/.github/workflows/build.yml @@ -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 }}