blob: b6cdfc6ac98c411ebf3e82b07f3e12e46fc3d58a [file] [log] [blame]
name: Build and Release
on:
push:
tags:
- 'v*'
workflow_dispatch:
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- run: npm test
build:
needs: test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '22'
cache: 'npm'
- run: npm ci
- run: mkdir -p bin/linux bin/macos bin/win
- name: Build Linux executable
run: npm run pkg-linux
- name: Build macOS executable
run: npm run pkg-macos
- name: Build Windows executable
run: npm run pkg-win
- name: Upload Linux binary
uses: actions/upload-artifact@v4
with:
name: conllu2cmc-linux-x64
path: bin/linux/conllu2cmc
if-no-files-found: error
- name: Upload macOS binary
uses: actions/upload-artifact@v4
with:
name: conllu2cmc-macos-x64
path: bin/macos/conllu2cmc
if-no-files-found: error
- name: Upload Windows binary
uses: actions/upload-artifact@v4
with:
name: conllu2cmc-win-x64
path: bin/win/conllu2cmc.exe
if-no-files-found: error
- name: Create GitHub Release
if: startsWith(github.ref, 'refs/tags/')
uses: softprops/action-gh-release@v2
with:
files: |
bin/linux/conllu2cmc
bin/macos/conllu2cmc
bin/win/conllu2cmc.exe
generate_release_notes: true