Web-Ide mit aufgenommen
This commit is contained in:
+51
@@ -0,0 +1,51 @@
|
||||
name: Deploy to gh-pages
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- simulator
|
||||
- web
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use Node.js 20
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Cache node modules
|
||||
id: cache-npm
|
||||
uses: actions/cache@v3
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
# npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
path: ~/.npm
|
||||
key: ${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
- name: Install
|
||||
run: npm install
|
||||
|
||||
- name: CD
|
||||
run: |
|
||||
git config --global user.name $user_name
|
||||
git config --global user.email $user_email
|
||||
git remote set-url origin https://${github_token}@github.com/${repository}
|
||||
./stamp.sh
|
||||
npm run build
|
||||
npm run -w web deploy
|
||||
VERSION=$(grep version package.json | awk -F\" '{print $4}')
|
||||
git tag "$VERSION" main
|
||||
git push origin "$VERSION"
|
||||
git push origin main
|
||||
env:
|
||||
user_name: "github-actions[bot]"
|
||||
user_email: "github-actions[bot]@users.noreply.github.com"
|
||||
github_token: ${{ secrets.ACTIONS_DEPLOY_ACCESS_TOKEN }}
|
||||
repository: ${{ github.repository }}
|
||||
+45
@@ -0,0 +1,45 @@
|
||||
name: Build vscode extension
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
branches: [main]
|
||||
paths:
|
||||
- simulator
|
||||
- extension
|
||||
|
||||
jobs:
|
||||
package:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Use Node.js 20
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Cache node modules
|
||||
id: cache-npm
|
||||
uses: actions/cache@v3
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
# npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
path: ~/.npm
|
||||
key: ${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
- name: Install
|
||||
run: npm install
|
||||
|
||||
- name: CD
|
||||
run: |
|
||||
npm run build
|
||||
npm run -w extension package
|
||||
|
||||
- name: Upload extension
|
||||
uses: actions/upload-artifact@v3
|
||||
with:
|
||||
name: nand2tetris-vscode
|
||||
path: |
|
||||
extension/nand2tetris-vscode-*.vsix
|
||||
+40
@@ -0,0 +1,40 @@
|
||||
name: Run Workspace Tests
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches: ["main", "release/**"]
|
||||
|
||||
jobs:
|
||||
all:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Use Node.js 20
|
||||
uses: actions/setup-node@v3
|
||||
with:
|
||||
node-version: 20
|
||||
|
||||
- name: Cache node modules
|
||||
id: cache-npm
|
||||
uses: actions/cache@v3
|
||||
env:
|
||||
cache-name: cache-node-modules
|
||||
with:
|
||||
# npm cache files are stored in `~/.npm` on Linux/macOS
|
||||
path: ~/.npm
|
||||
key: ${{ hashFiles('**/package-lock.json') }}
|
||||
|
||||
- if: ${{ steps.cache-npm.outputs.cache-hit == 'false' }}
|
||||
name: List the state of node modules
|
||||
continue-on-error: true
|
||||
run: npm list
|
||||
|
||||
- name: Install
|
||||
run: npm install
|
||||
|
||||
- name: CI
|
||||
run: npm run ci
|
||||
env:
|
||||
CI: true
|
||||
Reference in New Issue
Block a user