Add .gitea/workflows/build-release.yaml
This commit is contained in:
@@ -0,0 +1,41 @@
|
||||
name: Build & Release
|
||||
|
||||
on:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
build-and-release:
|
||||
name: Build and Create Release
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: '20'
|
||||
cache: 'npm'
|
||||
|
||||
- name: Install dependencies and Build
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
|
||||
- name: Create ZIP archive
|
||||
run: |
|
||||
# Zipping from inside the dist folder ensures 'dist' isn't the root folder in the zip
|
||||
cd dist
|
||||
zip -r ../lirkab-site.zip .
|
||||
|
||||
- name: Create Release & Attach ZIP
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
name: "Release ${{ github.ref_name }}"
|
||||
body: "Automated release of the Lirkab static site."
|
||||
files: lirkab-site.zip
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
Reference in New Issue
Block a user