forked from Willena/sqlite-jdbc-crypt
-
Notifications
You must be signed in to change notification settings - Fork 0
102 lines (98 loc) · 3.43 KB
/
build-release.yml
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
name: build
on:
workflow_dispatch:
push:
tags:
- '*.*.*'
jobs:
build_natives:
if: false
permissions:
contents: write
name: Build natives libraries
runs-on: ubuntu-20.04
steps:
- name: Make space
run: sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc
- uses: actions/checkout@v3
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 17
java-package: jdk
cache: 'maven'
- name: Source versions from VERSION file
run: cat VERSION >> $GITHUB_ENV
- name: Display version
run: echo $sqliteMCVersion $version $artifactVersion
- name: Build binaries, test, and package
env:
OCI_EXE: docker
run: make all
- name: Package native libraries
run: zip -r ./sqlcipher-natives-$artifactVersion.zip ./src/main/resources/org/sqlite/native
- uses: actions/upload-artifact@v3
with:
name: SQLCipher DLL Binaries
path: |
./sqlcipher-natives-${{ env.artifactVersion }}.zip
./target/*.jar
- name: Deploy version
env:
GLUON_NEXUS_USERNAME: ${{ secrets.GLUON_NEXUS_USERNAME }}
GLUON_NEXUS_PASSWORD: ${{ secrets.GLUON_NEXUS_PASSWORD }}
# GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
if: startsWith(github.ref, 'refs/tags/')
run: make deploy
- name: Deploy Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
name: "SQLCipher-jdbc-${{ env.artifactVersion }}"
generate_release_notes: true
files: |
./sqlcipher-natives-${{ env.artifactVersion }}.zip
./target/sqlcipher-jdbc-${{ env.artifactVersion }}.jar
./target/sqlcipher-jdbc-${{ env.artifactVersion }}-javadoc.jar
./target/sqlcipher-jdbc-${{ env.artifactVersion }}-sources.jar
./target/sqlcipher-jdbc-${{ env.artifactVersion }}.jar.asc
./target/sqlcipher-jdbc-${{ env.artifactVersion }}-javadoc.jar.asc
./target/sqlcipher-jdbc-${{ env.artifactVersion }}-sources.jar.asc
build-windows:
permissions:
contents: write
name: Build Windows native libraries
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- uses: ilammy/msvc-dev-cmd@v1
- uses: ilammy/setup-nasm@v1
- uses: actions/setup-java@v3
with:
distribution: 'adopt'
java-version: 17
java-package: jdk
cache: 'maven'
- name: Source versions from VERSION file
run: cat VERSION >> $GITHUB_ENV
- name: Display version
run: echo $sqliteMCVersion $version $artifactVersion
- name: Build OpenSSL
run: |
Invoke-Webrequest -URI https://www.openssl.org/source/openssl-1.1.1w.tar.gz -OutFile openssl-1.1.1w.tar.gz
tar zxf openssl-1.1.1w.tar.gz
cd openssl-1.1.1w
perl Configure VC-WIN64A --prefix=C:\openssl1.1.1
nmake
nmake install
ls C:\openssl1.1.1\include\openssl
ls C:\openssl1.1.1\bin
ls C:\openssl1.1.1\lib
- name: Build binaries, test, and package
env:
OCI_EXE: docker
CFLAGS: -I"C:/Progra~1/OpenSSL/include"
LDFLAGS: -L"C:/Progra~1/OpenSSL/lib"
run: |
make native
cat target/sqlcipher-3.39.4.0/config.log