-
-
Notifications
You must be signed in to change notification settings - Fork 0
77 lines (64 loc) · 2.02 KB
/
publish.yml
File metadata and controls
77 lines (64 loc) · 2.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: publish
on:
push:
tags:
- "*" # Trigger on any tag push
workflow_dispatch:
permissions:
contents: write
jobs:
publish:
name: Publish for ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- name: Extract version from tag
id: extract_version
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Install dependencies on Linux
if: matrix.os == 'ubuntu-latest'
run: sudo apt-get install -y sqlite3 gcc unzip
- name: Install dependencies on Windows
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
choco install -y mingw
choco install -y zip
choco install -y unzip
choco install -y sqlite
- name: Install dependencies on macOS
if: matrix.os == 'macos-latest'
run: |
brew install unzip
brew install sqlite
brew link sqlite --force
- name: Download and prepare sources
run: |
make prepare-dist
make download-sqlite
- name: Build for Linux
if: matrix.os == 'ubuntu-latest'
run: |
make compile-linux
make pack-linux version=${{ env.VERSION }}
- name: Build for Windows
if: matrix.os == 'windows-latest'
shell: pwsh
run: |
make compile-windows
make pack-windows version=${{ env.VERSION }}
- name: Build for macOS
if: matrix.os == 'macos-latest'
run: |
make compile-macos-universal
make pack-macos-universal version=${{ env.VERSION }}
- name: Upload binaries to release
uses: svenstaro/upload-release-action@2.9.0
with:
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: dist/*.zip
file_glob: true
tag: ${{ github.ref_name }}