blob: ad5b1495439b82aa7f68a4e94124715c1b6123ad [file] [log] [blame]
Marc Kupietz51382672026-03-07 10:31:39 +01001name: Build and Release
2
3on:
4 push:
5 tags:
6 - 'v*'
7 workflow_dispatch:
8
9jobs:
10 test:
11 runs-on: ubuntu-latest
12 steps:
13 - uses: actions/checkout@v4
14 - uses: actions/setup-node@v4
15 with:
Marc Kupietzebf770e2026-03-07 10:56:32 +010016 node-version: '22'
Marc Kupietz51382672026-03-07 10:31:39 +010017 cache: 'npm'
18 - run: npm ci
19 - run: npm test
20
21 build:
22 needs: test
23 runs-on: ubuntu-latest
24 steps:
25 - uses: actions/checkout@v4
26 - uses: actions/setup-node@v4
27 with:
Marc Kupietzebf770e2026-03-07 10:56:32 +010028 node-version: '22'
Marc Kupietz51382672026-03-07 10:31:39 +010029 cache: 'npm'
30 - run: npm ci
31 - run: mkdir -p bin/linux bin/macos bin/win
32 - name: Build Linux executable
33 run: npm run pkg-linux
34 - name: Build macOS executable
35 run: npm run pkg-macos
36 - name: Build Windows executable
37 run: npm run pkg-win
38 - name: Upload Linux binary
39 uses: actions/upload-artifact@v4
40 with:
41 name: conllu-gender-linux-x64
42 path: bin/linux/conllu-gender
43 if-no-files-found: error
44 - name: Upload macOS binary
45 uses: actions/upload-artifact@v4
46 with:
47 name: conllu-gender-macos-x64
48 path: bin/macos/conllu-gender
49 if-no-files-found: error
50 - name: Upload Windows binary
51 uses: actions/upload-artifact@v4
52 with:
53 name: conllu-gender-win-x64
54 path: bin/win/conllu-gender.exe
55 if-no-files-found: error
56 - name: Create GitHub Release
57 if: startsWith(github.ref, 'refs/tags/')
58 uses: softprops/action-gh-release@v2
59 with:
60 files: |
61 bin/linux/conllu-gender
62 bin/macos/conllu-gender
63 bin/win/conllu-gender.exe
64 generate_release_notes: true