Skip to content

Commit

Permalink
Merge pull request #6 from Night-Sky-Studio/actions
Browse files Browse the repository at this point in the history
Added workflow to autobuild and test scripts
  • Loading branch information
LilyStilson committed Aug 15, 2023
2 parents fe1893d + bb66899 commit 19ec8d7
Showing 1 changed file with 60 additions and 0 deletions.
60 changes: 60 additions & 0 deletions .github/workflows/node.js.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs

name: Node.js CI

on:
push:
branches: [ "master", "actions" ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- name: "Clone master"
uses: actions/checkout@v3
with:
ref: master
path: master

- name: "Clone compiler"
uses: actions/checkout@v3
with:
ref: compiler
path: compiler

- name: "Clone release"
uses: actions/checkout@v3
with:
ref: release
path: release

- name: "Install Node"
uses: actions/setup-node@v3
with:
node-version: latest
cache: 'npm'
cache-dependency-path: compiler/src/package-lock.json

- name: "Test and build scripts"
run: |
cd "compiler/src" || exit 1
npm i
npm run build
# - run: ls
# - uses: actions/checkout@v3
# with:
# ref: release
# token: ${{ secrets.GITHUB_TOKEN }}
- name: "Commit resulting build to release branch"
run: |
cd "release"
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
git add .
git commit -m "Automatic commit, run id: ${{ github.run_id }}"
git push

0 comments on commit 19ec8d7

Please sign in to comment.