Skip to content

Commit

Permalink
release action
Browse files Browse the repository at this point in the history
  • Loading branch information
caiiiycuk committed Mar 18, 2024
1 parent 8010d5b commit c9a3dc4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 40 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/build.js.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: build

on:
push:
branches: [ beta ]
branches: [ 8.xx ]
pull_request:
branches: [ beta ]
branches: [ 8.xx ]

jobs:
build:
Expand All @@ -24,7 +24,7 @@ jobs:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: sudo apt-get -yqq update
- run: sudo apt-get install -yq --no-install-recommends cmake ninja-build
- run: sudo apt-get install -yq --no-install-recommends cmake ninja-build zip
- run: npm install -g yarn
- run: yarn
- run: yarn run eslint src --ext ts,tsx --max-warnings 0
Expand All @@ -37,8 +37,16 @@ jobs:
- run: tar xfv binaryen-${{ matrix.binaryen-version }}-x86_64-linux.tar.gz
- run: cp -v binaryen-${{ matrix.binaryen-version }}/bin/wasm-opt ./emsdk/upstream/bin/wasm-opt
- run: source ./emsdk/emsdk_env.sh && yarn run gulp
- run: zip -9r release.zip dist/*
- name: upload
uses: actions/upload-artifact@v3.0.0
with:
name: 'dist'
path: 'dist'
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
name: ${{ github.ref_name }}
files: |
${{github.workspace}}/release.zip
38 changes: 1 addition & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,40 +1,4 @@
[![build emulators](https://github.com/js-dos/emulators/workflows/build/badge.svg)](https://github.com/js-dos/emulators/actions/workflows/build.js.yml)

Emulators for [js-dos 7.xx](https://js-dos.com/v7/build/)


## Using Docker

### Build image

```
docker build -t emulators .
```

### Test image


```
docker run -p 8080:8080 -ti emulators
```

Open `http://localhost:8080/test/test.html` in browser, all test should pass


### Development

Run inside the project dir:

```
docker run -v `pwd`/src:/app/src -v `pwd`/test:/app/test -v `pwd`/dist:/app/dist -ti emulators bash
source /emsdk/emsdk_env.sh
gulp OR ./node_modules/.bin/tsc --watch
```

Use your code editor to edit the content of src and test.
In the docker VM you can run `gulp` to build everything into `dist` OR use
`./node_modules/.bin/tsc --watch` if you need only compile time checks.



Emulators for [js-dos 8.xx](https://js-dos.com)

0 comments on commit c9a3dc4

Please sign in to comment.