Skip to content

Commit 3796cd4

Browse files
committed
Testing fix for including .mo files in GitHub CI
1 parent deb72c7 commit 3796cd4

File tree

1 file changed

+36
-21
lines changed

1 file changed

+36
-21
lines changed

.github/workflows/build_deploy.yml

Lines changed: 36 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@ name: Build and upload to PyPI
22

33
on:
44
workflow_dispatch:
5-
release:
6-
types:
7-
- published
5+
# release:
6+
# types:
7+
# - published
88

9-
jobs:
9+
jobs:
1010
build_wheels:
1111
name: Build wheels on ${{ matrix.os }}
1212
runs-on: ${{ matrix.os }}
@@ -18,8 +18,15 @@ jobs:
1818
steps:
1919
- uses: actions/checkout@v4
2020

21+
- name: Install build dependencies (for prebuild)
22+
run: |
23+
pip install --upgrade pip
24+
pip install guidata babel
25+
2126
- name: Build wheels
2227
uses: pypa/[email protected]
28+
env:
29+
CIBW_BEFORE_BUILD: pip install guidata babel && python -m plotpy.utils.translations compile --name plotpy --directory .
2330

2431
- uses: actions/upload-artifact@v4
2532
with:
@@ -32,6 +39,14 @@ jobs:
3239
steps:
3340
- uses: actions/checkout@v4
3441

42+
- name: Install build dependencies
43+
run: |
44+
pip install guidata babel
45+
46+
- name: Compile translations
47+
run: |
48+
python -m plotpy.utils.translations compile --name plotpy --directory .
49+
3550
- name: Build sdist
3651
run: pipx run build --sdist
3752

@@ -40,21 +55,21 @@ jobs:
4055
name: cibw-sdist
4156
path: dist/*.tar.gz
4257

43-
upload_pypi:
44-
needs: [build_wheels, build_sdist]
45-
runs-on: ubuntu-latest
46-
environment: pypi
47-
permissions:
48-
id-token: write
49-
if: github.event_name == 'release' && github.event.action == 'published'
50-
steps:
51-
- uses: actions/download-artifact@v4
52-
with:
53-
# unpacks all CIBW artifacts into dist/
54-
pattern: cibw-*
55-
path: dist
56-
merge-multiple: true
58+
# upload_pypi:
59+
# needs: [build_wheels, build_sdist]
60+
# runs-on: ubuntu-latest
61+
# environment: pypi
62+
# permissions:
63+
# id-token: write
64+
# if: github.event_name == 'release' && github.event.action == 'published'
65+
# steps:
66+
# - uses: actions/download-artifact@v4
67+
# with:
68+
# # unpacks all CIBW artifacts into dist/
69+
# pattern: cibw-*
70+
# path: dist
71+
# merge-multiple: true
5772

58-
- uses: pypa/gh-action-pypi-publish@release/v1
59-
with:
60-
password: ${{ secrets.PYPI_API_TOKEN }}
73+
# - uses: pypa/gh-action-pypi-publish@release/v1
74+
# with:
75+
# password: ${{ secrets.PYPI_API_TOKEN }}

0 commit comments

Comments
 (0)