You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ass/.github/workflows/ts-build.yml

47 lines
1.1 KiB

name: TypeScript Build
on:
push:
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
env:
ARCHIVE_NAME: ass-build-${{ github.run_id }}-${{ github.run_number }}
steps:
# Checkout repo
- uses: actions/checkout@v4
# Set up Node 16
- name: Setup Node.js environment
uses: actions/setup-node@v3
with:
node-version: 16.14.0
# Install npm 8 & TypeScript
- name: Install global packages
run: npm i -g npm@8 typescript
# Install ass dependencies (including types)
- name: Install dependencies
run: npm i --save-dev
# Compile the TypeScript files
- name: Run build script
run: npm run build
# Archive the built files
- name: Generate archive
uses: montudor/action-zip@v1
with:
args: zip -qq -r ${{ env.ARCHIVE_NAME }} ./
# Upload archive as an artifact
- name: Upload archive
uses: actions/upload-artifact@v3
with:
name: ${{ env.ARCHIVE_NAME }}
path: ${{ env.ARCHIVE_NAME }}.zip
if-no-files-found: error