Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build, Test and Release SQLite AI
name: Build, Test and Release
on:
push:
workflow_dispatch:
Expand Down
18 changes: 12 additions & 6 deletions .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@ on:
description: "Version to use for the Python package (e.g. 0.5.9)"
required: true
type: string
release:
types: [released]
workflow_run:
workflows: ["Build, Test and Release"]
types:
- completed

jobs:
build-and-publish:
if: |
github.event_name == 'workflow_dispatch' ||
(github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.head_branch == 'main')
runs-on: ${{ matrix.os }}
permissions:
id-token: write # mandatory for Pypi trusted publishing
id-token: write # mandatory for Pypi trusted publishing
strategy:
matrix:
include:
Expand Down Expand Up @@ -42,7 +47,7 @@ jobs:
platform: macos
python-version: "3.10"
arch: arm64
plat_name: macosx_11_0_arm64
plat_name: macosx_11_0_arm64
defaults:
run:
shell: bash
Expand All @@ -65,8 +70,9 @@ jobs:
- name: Get version
id: get_version
run: |
if [[ "${{ github.event_name }}" == "release" ]]; then
VERSION="${{ github.event.release.tag_name }}"
if [[ "${{ github.event_name }}" == "workflow_run" ]]; then
# Fetch latest published release tag from GitHub API
VERSION=$(curl -s "https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r '.tag_name')
else
VERSION="${{ github.event.inputs.version }}"
fi
Expand Down
Loading