50 lines
1.1 KiB
YAML
50 lines
1.1 KiB
YAML
# .gitea/workflows/build.yaml
|
|
name: Build Workflow
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths-ignore:
|
|
- '.gitea/workflows/*'
|
|
|
|
jobs:
|
|
Build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v3
|
|
- name: Install NodeJS
|
|
uses: actions/setup-node@v3
|
|
with:
|
|
node-version: '18'
|
|
- name: Install Dependencies
|
|
run: npm ci
|
|
- name: Run Tests
|
|
run: npm test
|
|
- name: Build
|
|
run: npm run build
|
|
- name: Package Artifacts
|
|
uses: https://github.com/thedoctor0/zip-release@0.7.1
|
|
with:
|
|
type: 'tar'
|
|
path: dist
|
|
filename: 'dist.tar.gz'
|
|
- name: Upload Artifacts
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: dist.tar.gz
|
|
path: dist.tar.gz
|
|
Deploy:
|
|
runs-on: ubuntu-latest
|
|
needs: Build
|
|
steps:
|
|
- name: Access Artifacts
|
|
uses: actions/download-artifact@v3
|
|
with:
|
|
name: dist.tar.gz
|
|
- name: Deploy
|
|
run: |
|
|
echo Deploying...
|
|
ls -l
|
|
echo DONE! |