Skip to content

ci: Add GitHub Actions workflow for build and release #25

ci: Add GitHub Actions workflow for build and release

ci: Add GitHub Actions workflow for build and release #25

Workflow file for this run

# .github/workflows/release.yml
name: Build & Release
on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+*'
jobs:
release:
strategy:
matrix:
os: [ubuntu-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Check out git repository
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: Install Linux dependencies and set FUSE_PATH
if: runner.os == 'Linux'
run: |
sudo apt-get update
sudo apt-get install -y libfuse2 libarchive-tools
# Находим реальный путь к библиотеке libfuse.so.2
FUSE_REAL_PATH=$(readlink -f /usr/lib/x86_64-linux-gnu/libfuse.so.2)
echo "Found libfuse.so.2 at: ${FUSE_REAL_PATH}"
# Экспортируем этот путь в переменные окружения для последующих шагов
echo "FUSE_PATH=${FUSE_REAL_PATH}" >> $GITHUB_ENV
- name: Build and release
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
run: npm run dist -- --publish always