1
1
name : publish
2
2
3
3
on :
4
- push :
5
- tags :
6
- - " *"
7
- workflow_dispatch :
8
-
9
- env :
10
- SQLITE_RELEASE_YEAR : " 2021"
11
- SQLITE_VERSION : " 3360000"
12
- SQLITE_BRANCH : " 3.36"
4
+ push :
5
+ tags :
6
+ - " *" # Trigger on any tag push
7
+ workflow_dispatch :
13
8
14
9
jobs :
15
- publish :
16
- name : Publish for ${{ matrix.os }}
17
- runs-on : ${{ matrix.os }}
18
- strategy :
19
- matrix :
20
- include :
21
- - os : ubuntu-20.04
22
- - os : windows-latest
23
- - os : macos-latest
10
+ publish :
11
+ name : Publish for ${{ matrix.os }}
12
+ runs-on : ${{ matrix.os }}
13
+ strategy :
14
+ matrix :
15
+ os : [ubuntu-20.04, windows-latest, macos-latest]
16
+
17
+ steps :
18
+ - uses : actions/checkout@v4
19
+
20
+ - name : Extract version from tag
21
+ id : extract_version
22
+ run : echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
23
+
24
+ - name : Install dependencies on Linux
25
+ if : matrix.os == 'ubuntu-20.04'
26
+ run : sudo apt-get install -y sqlite3 gcc unzip gcc-aarch64-linux-gnu
27
+
28
+ - name : Install dependencies on Windows
29
+ if : matrix.os == 'windows-latest'
30
+ shell : pwsh
31
+ run : |
32
+ choco install -y mingw
33
+ choco install -y unzip
34
+ choco install -y sqlite
24
35
25
- steps :
26
- - uses : actions/checkout@v2
36
+ - name : Install dependencies on macOS
37
+ if : matrix.os == 'macos-latest'
38
+ run : |
39
+ brew install unzip
40
+ brew install sqlite
41
+ brew link sqlite --force
27
42
28
- - name : Download SQLite sources
29
- shell : bash
30
- run : |
31
- make prepare-dist
32
- make download-sqlite
33
- make download-external
43
+ - name : Download and prepare sources
44
+ run : |
45
+ make prepare-dist
46
+ make download-sqlite
34
47
35
- - name : Build for Linux
36
- if : matrix.os == 'ubuntu-20.04'
37
- run : |
38
- sudo apt update
39
- sudo apt install -y gcc-aarch64-linux-gnu
40
- make compile-linux-x86
41
- make compile-linux-arm64
42
- make pack-linux
48
+ - name : Build for Linux
49
+ if : matrix.os == 'ubuntu-20.04'
50
+ run : |
51
+ make compile-linux-x86
52
+ make compile-linux-arm64
53
+ make pack-linux version=${{ env.VERSION }}
43
54
44
- - name : Install MSYS2 and 'mingw-w64-i686-toolchain'
45
- if : matrix.os == 'windows-latest'
46
- uses : msys2/setup-msys2@v2
47
- with :
48
- cache : true
49
- install : mingw-w64-i686-toolchain
50
- update : true
55
+ - name : Install MSYS2 and 'mingw-w64-i686-toolchain'
56
+ if : matrix.os == 'windows-latest'
57
+ uses : msys2/setup-msys2@v2
58
+ with :
59
+ update : true
60
+ install : mingw-w64-i686-toolchain
61
+ msystem : MINGW32
51
62
52
- - name : Build for Windows
53
- if : matrix.os == 'windows-latest'
54
- shell : bash
55
- run : |
56
- $RUNNER_TEMP/msys64/msys2_shell.cmd -defterm -no-start -mingw32 -lc "mingw32- make compile-windows-x86"
57
- make compile-windows
58
- make pack-windows
63
+ - name : Build for Windows
64
+ if : matrix.os == 'windows-latest'
65
+ shell : msys2 {0}
66
+ run : |
67
+ make compile-windows-x86
68
+ make compile-windows
69
+ make pack-windows version=${{ env.VERSION }}
59
70
60
- - name : Build for macOS
61
- if : matrix.os == 'macos-latest'
62
- run : |
63
- make compile-macos-x86
64
- make compile-macos-arm64
65
- make pack-macos
71
+ - name : Build for macOS
72
+ if : matrix.os == 'macos-latest'
73
+ run : |
74
+ make compile-macos-x86
75
+ make compile-macos-arm64
76
+ make pack-macos version=${{ env.VERSION }}
66
77
67
- - name : Upload binaries to release
68
- uses : svenstaro/upload-release-action@v2
69
- with :
70
- repo_token : ${{ secrets.GITHUB_TOKEN }}
71
- file : dist/*.zip
72
- file_glob : true
73
- tag : ${{ github.ref }}
78
+ - name : Upload binaries to release
79
+ uses : svenstaro/upload-release-action@v2
80
+ with :
81
+ repo_token : ${{ secrets.GITHUB_TOKEN }}
82
+ file : dist/*.zip
83
+ file_glob : true
84
+ tag : ${{ github.ref_name }}
0 commit comments