From 9900a4801a5a0fde73d4bfb02195cada6cbaf0e5 Mon Sep 17 00:00:00 2001 From: ultrablob Date: Thu, 17 Apr 2025 18:58:39 -0400 Subject: [PATCH] add CI --- .github/workflows/deploy.yml | 55 ++++++++++++++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 .github/workflows/deploy.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..297b27b --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,55 @@ +name: CI + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the master branch + push: + branches: [ main ] + pull_request: + branches: [ main ] + + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "build" + build: + # The type of runner that the job will run on + runs-on: docker + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + + - name: Build Release + if: env.GITHUB_EVENT_NAME == 'push' + run: echo "BUILD_TYPE=release" >> $GITHUB_ENV + + - name: Build Debug/Beta + if: env.GITHUB_EVENT_NAME == 'pull_request' + run: echo "BUILD_TYPE=debug" >> $GITHUB_ENV + + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - uses: https://code.forgejo.org/actions/checkout@v2 + name: Checkout Files + + - name: Set up Node + uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: Build + run: npm run build + + - name: Upload Build + uses: https://code.forgejo.org/forgejo/upload-artifact@v4 + id: upload-build + with: + name: Build.zip + path: './dist' + retention-days: 3 + overwrite: true