forked from xerial/sqlite-jdbc
-
Notifications
You must be signed in to change notification settings - Fork 34
84 lines (78 loc) · 2.86 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
name: build
on:
workflow_dispatch:
push:
tags:
- '*.*.*.*'
jobs:
build_natives:
permissions:
contents: write
name: Build natives libraries
runs-on: ubuntu-20.04
steps:
- uses: jlumbroso/free-disk-space@main
name: Free Disk Space (Ubuntu)
with:
# this might remove tools that are actually needed,
# if set to "true" but frees about 6 GB
tool-cache: false
# all of these default to true, but feel free to set to
# "false" if necessary for your workflow
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: 11
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 DLL binaries
run: zip -r ./sqlite-natives-$artifactVersion.zip ./src/main/resources/org/sqlite/native
- uses: actions/upload-artifact@v3
with:
name: SQLiteMC DLL Binaries
path: |
./sqlite-natives-${{ env.artifactVersion }}.zip
./target/*.jar
- name: Prepare GPG sign
if: startsWith(github.ref, 'refs/tags/')
run: |
openssl aes-256-cbc -K ${{ secrets.ENCRYPTED_KEY }} -iv ${{ secrets.ENCRYPTED_IV }} -in ./scripts/private.key.enc -out /tmp/private.key -d
gpg --version
gpg --batch --import /tmp/private.key
rm /tmp/private.key
- name: Deploy version
env:
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_PASSWORD: ${{ secrets.SONATYPE_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: "SQLite-jdbc-${{ env.artifactVersion }}"
generate_release_notes: true
files: |
./sqlite-natives-${{ env.artifactVersion }}.zip
./target/sqlite-jdbc-${{ env.artifactVersion }}.jar
./target/sqlite-jdbc-${{ env.artifactVersion }}-javadoc.jar
./target/sqlite-jdbc-${{ env.artifactVersion }}-sources.jar
./target/sqlite-jdbc-${{ env.artifactVersion }}.jar.asc
./target/sqlite-jdbc-${{ env.artifactVersion }}-javadoc.jar.asc
./target/sqlite-jdbc-${{ env.artifactVersion }}-sources.jar.asc