Skip to content

Commit 5f13299

Browse files
authored
Merge pull request #23 from contentauth/ok-nick/fix-publish
Create reusable build workflow for publishing
2 parents 80c70fa + c9d20c6 commit 5f13299

File tree

3 files changed

+24
-18
lines changed

3 files changed

+24
-18
lines changed

.github/workflows/build.yml

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,7 @@
11
name: Build
22

33
on:
4-
pull_request:
5-
push:
6-
branches:
7-
- main
8-
tags:
9-
- "*"
10-
workflow_dispatch:
11-
12-
permissions:
13-
contents: read
4+
workflow_call:
145

156
jobs:
167
linux:
@@ -20,7 +11,7 @@ jobs:
2011
target: [x86_64, aarch64]
2112
steps:
2213
- uses: actions/checkout@v4
23-
- uses: actions/setup-python@v4
14+
- uses: actions/setup-python@v5
2415
with:
2516
python-version: "3.10"
2617
cache: "pip"
@@ -67,7 +58,7 @@ jobs:
6758
target: [x64, x86]
6859
steps:
6960
- uses: actions/checkout@v4
70-
- uses: actions/setup-python@v4
61+
- uses: actions/setup-python@v5
7162
with:
7263
python-version: '3.10'
7364
architecture: ${{ matrix.target }}
@@ -89,7 +80,7 @@ jobs:
8980
runs-on: macos-latest
9081
steps:
9182
- uses: actions/checkout@v4
92-
- uses: actions/setup-python@v4
83+
- uses: actions/setup-python@v5
9384
with:
9485
python-version: '3.10'
9586
cache: "pip"
@@ -110,7 +101,7 @@ jobs:
110101
runs-on: macos-latest-large
111102
steps:
112103
- uses: actions/checkout@v4
113-
- uses: actions/setup-python@v4
104+
- uses: actions/setup-python@v5
114105
with:
115106
python-version: '3.10'
116107
cache: "pip"
@@ -141,3 +132,4 @@ jobs:
141132
with:
142133
name: wheels
143134
path: dist
135+

.github/workflows/ci-build.yml

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
name: CI Build
2+
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
8+
tags:
9+
- "*"
10+
workflow_dispatch:
11+
12+
jobs:
13+
build:
14+
uses: ./.github/workflows/build.yml

.github/workflows/publish.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@ on:
66
- "*"
77
workflow_dispatch:
88

9-
permissions:
10-
contents: read
11-
129
jobs:
10+
build:
11+
uses: ./.github/workflows/build.yml
12+
1313
release:
1414
name: Release
1515
runs-on: ubuntu-latest
1616
environment: Publish
17-
needs: [linux, windows, macos_x86, macos_aarch64, sdist]
17+
needs: [build]
1818
steps:
1919
- uses: actions/download-artifact@v4
2020
with:

0 commit comments

Comments
 (0)