Skip to content

fix bug

fix bug #4

Workflow file for this run

# 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: Compile TypeScript
permissions:
contents: write
on:
push:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [20.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install -g typescript
- run: git clone https://github.com/nginx/njs.git && mv njs/ts/ type
- run: tsc --target ES2022 --lib ES2022 main.ts
- name: Upload binaries to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: main.js
release_name: 'latest'
asset_name: vlist5.js
tag: ${{ github.ref }}
overwrite: true
body: "tsc编译后的版本,可以直接用于nginx"