Skip to content

Commit d4f3c9f

Browse files
committed
ci: add main CI workflow
1 parent cc4fb29 commit d4f3c9f

4 files changed

Lines changed: 55 additions & 9 deletions

File tree

.github/workflows/build-linux.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
name: Build for Linux
22

33
on:
4-
push:
5-
branches:
6-
- master
4+
workflow_call:
75
pull_request:
86
workflow_dispatch:
97

.github/workflows/build-macos.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
name: Build for macOS
22

33
on:
4-
push:
5-
branches:
6-
- master
4+
workflow_call:
75
pull_request:
86
workflow_dispatch:
97

.github/workflows/build-windows.yml

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
name: Build for Windows
22

33
on:
4-
push:
5-
branches:
6-
- master
4+
workflow_call:
75
pull_request:
86
workflow_dispatch:
97

.github/workflows/ci.yml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: CI and Publish to PyPI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
tags:
8+
- 'v*'
9+
workflow_dispatch:
10+
11+
jobs:
12+
build-windows:
13+
uses: ./.github/workflows/build-windows.yml
14+
15+
build-linux:
16+
uses: ./.github/workflows/build-linux.yml
17+
18+
build-macos:
19+
uses: ./.github/workflows/build-macos.yml
20+
21+
publish:
22+
name: Upload to PyPI
23+
runs-on: ubuntu-latest
24+
needs: [build-windows, build-linux, build-macos]
25+
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')
26+
27+
permissions:
28+
id-token: write
29+
contents: read
30+
31+
environment:
32+
name: pypi
33+
url: https://pypi.org/p/vapoursynth-knlmeanscl
34+
35+
steps:
36+
- name: Checkout repository
37+
uses: actions/checkout@v6
38+
39+
- name: Setup uv
40+
uses: astral-sh/setup-uv@v8.0.0
41+
42+
- name: Build sdist
43+
run: uv build --sdist
44+
45+
- name: Download all artifacts
46+
uses: actions/download-artifact@v8
47+
with:
48+
path: dist
49+
merge-multiple: true
50+
51+
- name: Publish to PyPI
52+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)