Skip to content

Commit d6fd041

Browse files
committed
🔧 Update GitHub Action matrix names to make it clearer
1 parent ab96545 commit d6fd041

File tree

2 files changed

+19
-19
lines changed

2 files changed

+19
-19
lines changed

.github/workflows/publish.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
package_dir:
18-
- ./
19-
- typer_package
20-
- typer_cli_package
17+
package:
18+
- typer-slim
19+
- typer
20+
- typer-cli
21+
env:
22+
dir: ${{ matrix.package == 'typer-slim' && './' || matrix.package == 'typer' && 'typer_package' || matrix.package == 'typer-cli' && 'typer_cli_package' }}
2123
permissions:
2224
id-token: write
2325
steps:
@@ -36,9 +38,9 @@ jobs:
3638
- name: Install build dependencies
3739
run: pip install build
3840
- name: Build distribution
39-
working-directory: ${{ matrix.package_dir }}
41+
working-directory: ${{ env.dir }}
4042
run: python -m build
4143
- name: Publish
4244
uses: pypa/[email protected]
4345
with:
44-
packages-dir: ${{ matrix.package_dir }}/dist/
46+
packages-dir: ${{ env.dir }}/dist/

.github/workflows/test-redistribute.yml

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,12 @@ jobs:
1414
runs-on: ubuntu-latest
1515
strategy:
1616
matrix:
17-
package_dir:
18-
- ./
19-
- typer_package
20-
- typer_cli_package
17+
package:
18+
- typer-slim
19+
- typer
20+
- typer-cli
21+
env:
22+
dir: ${{ matrix.package == 'typer-slim' && './' || matrix.package == 'typer' && 'typer_package' || matrix.package == 'typer-cli' && 'typer_cli_package' }}
2123
steps:
2224
- name: Dump GitHub context
2325
env:
@@ -34,29 +36,25 @@ jobs:
3436
- name: Install build dependencies
3537
run: pip install build
3638
- name: Build source distribution
37-
working-directory: ${{ matrix.package_dir }}
39+
working-directory: ${{ env.dir }}
3840
run: python -m build --sdist
3941
- name: Decompress source distribution
40-
working-directory: ${{ matrix.package_dir }}
42+
working-directory: ${{ env.dir }}
4143
run: |
4244
cd dist
4345
tar xvf typer*.tar.gz
4446
- name: Install test dependencies
45-
if: ${{ matrix.package_dir == './' }}
47+
if: ${{ matrix.package == 'typer-slim' }}
4648
run: |
4749
cd dist/typer*/
4850
pip install -r requirements-tests.txt
4951
- name: Run source distribution tests
50-
if: ${{ matrix.package_dir == './' }}
52+
if: ${{ matrix.package == 'typer-slim' }}
5153
run: |
5254
cd dist/typer*/
5355
bash scripts/test.sh
5456
- name: Build wheel distribution
55-
working-directory: ${{ matrix.package_dir }}
57+
working-directory: ${{ env.dir }}
5658
run: |
5759
cd dist
5860
pip wheel --no-deps typer*.tar.gz
59-
- name: Dump GitHub context
60-
env:
61-
GITHUB_CONTEXT: ${{ toJson(github) }}
62-
run: echo "$GITHUB_CONTEXT"

0 commit comments

Comments
 (0)