File tree Expand file tree Collapse file tree 1 file changed +14
-8
lines changed
Expand file tree Collapse file tree 1 file changed +14
-8
lines changed Original file line number Diff line number Diff line change 77 description : " Version to use for the Python package (e.g. 0.5.9)"
88 required : true
99 type : string
10- release :
11- types : [released]
10+ workflow_run :
11+ workflows : ["Build, Test and Release SQLite AI"]
12+ types :
13+ - completed
1214
1315jobs :
14- build-and-publish :
16+ build-and-publish : # && github.event.workflow_run.head_branch == 'main')
17+ if : |
18+ github.event_name == 'workflow_dispatch' ||
19+ (github.event_name == 'workflow_run' && github.event.workflow_run.conclusion == 'success')
1520 runs-on : ${{ matrix.os }}
1621 permissions :
17- id-token : write # mandatory for Pypi trusted publishing
22+ id-token : write # mandatory for Pypi trusted publishing
1823 strategy :
1924 matrix :
2025 include :
4247 platform : macos
4348 python-version : " 3.10"
4449 arch : arm64
45- plat_name : macosx_11_0_arm64
50+ plat_name : macosx_11_0_arm64
4651 defaults :
4752 run :
4853 shell : bash
6570 - name : Get version
6671 id : get_version
6772 run : |
68- if [[ "${{ github.event_name }}" == "release" ]]; then
69- VERSION="${{ github.event.release.tag_name }}"
73+ if [[ "${{ github.event_name }}" == "workflow_run" ]]; then
74+ # Fetch latest published release tag from GitHub API
75+ VERSION=$(curl -s "https://api.github.com/repos/${{ github.repository }}/releases/latest" | jq -r '.tag_name')
7076 else
7177 VERSION="${{ github.event.inputs.version }}"
7278 fi
9399 # Avoid workflow to fail if the version has already been published
94100 skip-existing : true
95101 # Upload to Test Pypi for testing
96- # repository-url: https://test.pypi.org/legacy/
102+ repository-url : https://test.pypi.org/legacy/
You can’t perform that action at this time.
0 commit comments