mirror of
https://gitea.gofwd.group/Forward_Group/ballistic-builder-spring.git
synced 2025-12-05 18:46:44 -05:00
40 lines
993 B
YAML
40 lines
993 B
YAML
# File: .gitea/workflows/build-and-upload.yml
|
|
name: Build and Upload Artifact
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
pull_request:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
# Step 1: Check out repository code
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
|
|
# Step 2: Set up Node.js (example for a JS project; adjust for your stack)
|
|
- name: Set up Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 20
|
|
|
|
# Step 3: Install dependencies
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
# Step 4: Build project
|
|
- name: Build project
|
|
run: npm run build
|
|
|
|
# Step 5: Upload build output as artifact
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: build-output
|
|
path: dist/ # Change to your build output directory
|
|
retention-days: 7 # Optional: how long to keep artifact
|