This repository has been archived by the owner on Dec 19, 2024. It is now read-only.
Merge pull request #245 from XWasHere/dev/0.15.0 #544
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: TypeScript Build | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
cancel-in-progress: true | |
on: | |
push: | |
workflow_dispatch: | |
jobs: | |
build: | |
if: "!contains(github.event.head_commit.message, '[skip ci:ts]')" | |
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 20 | |
- name: Setup Node.js environment | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 20 | |
# Install npm 10 & TypeScript | |
- name: Install global packages | |
run: npm i -g npm@10 typescript pnpm | |
# Install ass dependencies (including types) | |
- name: Install dependencies | |
run: pnpm i | |
# 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 |