ci: add Gitea Actions build + tag release pipeline

This commit is contained in:
2026-08-19 02:46:32 +08:00
parent 71ef7fa36f
commit b571953f10
+46
View File
@@ -0,0 +1,46 @@
name: build-extension
on:
push:
branches: [feat/ismis-helper, prod]
tags: ['v*']
pull_request:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 20
- name: Install dev dependencies
run: npm ci || npm install
- name: Run tests
run: npm test
- name: Build both variants
run: node scripts/build.js all
- name: Upload zip artifacts
uses: actions/upload-artifact@v4
with:
name: ismis-helper-zips
path: dist/*.zip
if-no-files-found: error
- name: Publish release on version tag
if: startsWith(github.ref, 'refs/tags/v')
# softprops/action-gh-release works on Gitea Actions: it uses the
# automatically-provided GITHUB_TOKEN to create a Release for the tag
# and attaches the supplied files.
uses: softprops/action-gh-release@v2
with:
files: dist/*.zip
name: ${{ github.ref_name }}
generate_release_notes: true