47 lines
1.1 KiB
YAML
47 lines
1.1 KiB
YAML
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
|