Build / build (push) Successful in 9m40s
CMake the way CLion does it (profiles and presets, targets, run and debug configurations, CTest) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: Tomáš Černík <Tom.cernik@gmail.com> Reviewed-on: #1
54 lines
1.2 KiB
YAML
54 lines
1.2 KiB
YAML
name: Build
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
tags: ["v*"]
|
|
pull_request:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Node.js
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 22
|
|
cache: npm
|
|
|
|
- name: Install dependencies
|
|
run: npm ci
|
|
|
|
- name: Typecheck
|
|
run: npm run typecheck
|
|
|
|
- name: Check tag matches package.json version
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
run: |
|
|
pkg="v$(node -p 'require("./package.json").version')"
|
|
if [ "$pkg" != "${GITHUB_REF_NAME}" ]; then
|
|
echo "Tag ${GITHUB_REF_NAME} does not match package.json version $pkg"
|
|
exit 1
|
|
fi
|
|
|
|
- name: Package
|
|
run: npm run package -- --skip-license
|
|
|
|
# upload-artifact@v4 is not supported by older Gitea versions
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: vsix
|
|
path: "*.vsix"
|
|
|
|
- name: Release
|
|
if: startsWith(github.ref, 'refs/tags/v')
|
|
uses: akkuman/gitea-release-action@v1
|
|
with:
|
|
files: "*.vsix"
|