add workflow
This commit is contained in:
41
.gitea/workflows/build-on-tag.yml
Normal file
41
.gitea/workflows/build-on-tag.yml
Normal file
@@ -0,0 +1,41 @@
|
||||
name: Build ESLint Config on Tag
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- 'v*' # triggers on tags like v1.0.0, v2.3.1, etc.
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout code
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Setup Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: 20
|
||||
cache: npm
|
||||
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
|
||||
- name: Build
|
||||
run: npm run build
|
||||
|
||||
- name: Verify dist
|
||||
run: |
|
||||
if [ ! -d "dist" ]; then
|
||||
echo "Build failed: dist/ directory not found"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# 6️⃣ Optional: Archive dist as artifact
|
||||
# Uncomment if you want to attach build output to the workflow run
|
||||
# - name: Archive build
|
||||
# uses: actions/upload-artifact@v3
|
||||
# with:
|
||||
# name: eslint-config-dist
|
||||
# path: dist
|
||||
Reference in New Issue
Block a user