Skip to content

Commit

Permalink
chore: bump version and improve release workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
DjDeveloperr committed Aug 18, 2024
1 parent 35156ce commit 9d2574c
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 8 deletions.
25 changes: 22 additions & 3 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ jobs:
test:
strategy:
matrix:
os: [ubuntu-20.04, windows-latest, macos-latest]
os: [ubuntu-20.04, windows-2022, macos-14]

runs-on: ${{ matrix.os }}

Expand All @@ -78,10 +78,28 @@ jobs:
deno-version: 'v1.x'

- name: Setup MSVC Dev Env
if: matrix.os == 'windows-latest'
if: matrix.os == 'windows-2022'
uses: ilammy/msvc-dev-cmd@v1

- name: Build sqlite3
- name: Build sqlite3 (windows, linux)
if: matrix.os != 'macos-14'
env:
TARGET_ARCH: x86_64
CC:
run: deno task build

- name: Build sqlite3 (macos-x86_64)
if: matrix.os == 'macos-14'
env:
TARGET_ARCH: x86_64
CC: clang -arch x86_64
run: deno task build

- name: Build sqlite3 (macos-aarch64)
if: matrix.os == 'macos-14'
env:
TARGET_ARCH: aarch64
CC: clang -arch arm64
run: deno task build

- name: Run Tests
Expand All @@ -100,4 +118,5 @@ jobs:
files: |
build/libsqlite3.so
build/libsqlite3.dylib
build/libsqlite3_aarch64.dylib
build/sqlite3.dll
16 changes: 16 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Publish
on: release

jobs:
publish:
runs-on: ubuntu-latest

permissions:
contents: read
id-token: write

steps:
- uses: actions/checkout@v4

- name: Publish package
run: npx jsr publish
2 changes: 1 addition & 1 deletion deno.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@db/sqlite",
"version": "0.11.2",
"version": "0.12.0",
"github": "https://github.com/denodrivers/sqlite3",

"exports": "./mod.ts",
Expand Down
6 changes: 2 additions & 4 deletions scripts/build.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,13 +54,11 @@ const $ = (cmd: string | URL, ...args: string[]) => {
}).outputSync();
};

await Deno.remove(new URL("../build", import.meta.url), { recursive: true })
.catch(() => {});
await Deno.remove(new URL("../sqlite/build", import.meta.url), {
recursive: true,
})
.catch(() => {});
await Deno.mkdir(new URL("../build", import.meta.url));
await Deno.mkdir(new URL("../build", import.meta.url)).catch(() => {});
await Deno.mkdir(new URL("../sqlite/build", import.meta.url));

if (Deno.build.os !== "windows") {
Expand Down Expand Up @@ -97,7 +95,7 @@ if (Deno.build.os === "windows") {
new URL("../sqlite/configure", import.meta.url),
"--enable-releasemode",
"--enable-update-limit",
...(Deno.build.arch === ARCH ? [] : ["--disable-tcl", "--host=arm-linux"]),
...(Deno.build.arch === ARCH || Deno.build.os !== "linux" ? [] : ["--disable-tcl", "--host=arm-linux"]),
);
$(
"make",
Expand Down

0 comments on commit 9d2574c

Please sign in to comment.