Skip to content

Merge pull request #7 from compiler-explorer/websocket-heartbeat-ping… #117

Merge pull request #7 from compiler-explorer/websocket-heartbeat-ping…

Merge pull request #7 from compiler-explorer/websocket-heartbeat-ping… #117

Workflow file for this run

name: Build and Lint
on:
push:
pull_request:
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
- name: Install dependencies
run: npm ci
- name: Run linter
run: npm run lint
- name: Run type check
run: npm run typecheck
- name: Run tests
run: npm run test
- name: Build project
run: npm run build
- name: Install production dependencies
if: github.event_name == 'release'
run: |
rm -Rf node_modules
npm install --no-audit --ignore-scripts --production
npm install --no-audit --ignore-scripts --production --cpu arm64
- name: Create release archive
if: github.event_name == 'release'
run: |
mkdir -p release-temp
cp -r dist/* release-temp/
cp -r node_modules release-temp/
cp package.json package-lock.json release-temp/
cd release-temp
zip -r ../ce-router-${{ github.event.release.tag_name }}.zip .
- name: Upload release asset
if: github.event_name == 'release'
uses: softprops/action-gh-release@v2
with:
files: ./ce-router-${{ github.event.release.tag_name }}.zip