Skip to content

Commit 96c5c42

Browse files
authored
Migrate workflows to central actions in MREYE-LUMC/actions (#16)
* Migrate CI workflow to central setup action * Migrate release workflow to central release action
1 parent 0c58e90 commit 96c5c42

File tree

3 files changed

+10
-66
lines changed

3 files changed

+10
-66
lines changed

.github/actions/setup/action.yml

Lines changed: 0 additions & 20 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ permissions:
55

66
on:
77
push:
8-
branches: [main]
8+
branches: ["*"]
99
pull_request:
1010
branches: [main]
1111

@@ -14,15 +14,15 @@ jobs:
1414
runs-on: ubuntu-latest
1515
steps:
1616
- uses: actions/checkout@v6
17-
- uses: ./.github/actions/setup
17+
- uses: MREYE-LUMC/actions/python-setup@main
1818
- run: uv lock --locked
1919

2020
lint:
2121
runs-on: ubuntu-latest
2222
needs: [lock_file]
2323
steps:
2424
- uses: actions/checkout@v6
25-
- uses: ./.github/actions/setup
25+
- uses: MREYE-LUMC/actions/python-setup@main
2626
- run: uvx ruff check
2727
- run: uvx ruff format --check
2828

@@ -34,5 +34,5 @@ jobs:
3434
python-version: ["3.10", "3.11", "3.12", "3.13"]
3535
steps:
3636
- uses: actions/checkout@v6
37-
- uses: ./.github/actions/setup
37+
- uses: MREYE-LUMC/actions/python-setup@main
3838
- run: uv run --python ${{ matrix.python-version }} pytest

.github/workflows/python-publish.yml

Lines changed: 6 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,10 @@ jobs:
1919

2020
steps:
2121
- uses: actions/checkout@v6
22-
- uses: ./.github/actions/setup
23-
- name: Build package
24-
run: uv build
25-
- name: Upload dist
26-
uses: actions/upload-artifact@v7
22+
- uses: MREYE-LUMC/actions/python-build@main
2723
with:
28-
name: dist
29-
path: "dist/"
24+
artifact-name: dist
25+
artifact-path: "dist/"
3026

3127
publish_to_pypi:
3228
name: Publish to PyPI
@@ -36,43 +32,11 @@ jobs:
3632

3733
permissions:
3834
id-token: write
39-
40-
steps:
41-
- name: Download dist
42-
uses: actions/download-artifact@v8
43-
with:
44-
name: dist
45-
path: dist
46-
- name: Set up uv
47-
id: setup-uv
48-
uses: astral-sh/setup-uv@v7
49-
- name: Publish package
50-
run: uv publish
51-
52-
upload_to_github:
53-
name: Upload to GitHub
54-
runs-on: ubuntu-latest
55-
if: github.event_name == 'release'
56-
needs: build
57-
58-
permissions:
5935
contents: write
6036

6137
steps:
62-
- name: Download dist
63-
uses: actions/download-artifact@v8
64-
with:
65-
name: dist
66-
path: dist
67-
- name: Upload wheels to GitHub release
68-
uses: svenstaro/upload-release-action@2.11.4
69-
with:
70-
tag: ${{ github.ref }}
71-
file: "dist/*.whl"
72-
file_glob: true
73-
- name: Upload dist to GitHub release
74-
uses: svenstaro/upload-release-action@2.11.4
38+
- uses: MREYE-LUMC/actions/python-publish@main
7539
with:
7640
tag: ${{ github.ref }}
77-
file: "dist/*.tar.gz"
78-
file_glob: true
41+
artifact-name: dist
42+
artifact-path: "dist/"

0 commit comments

Comments
 (0)