Skip to content

Commit 2a5b682

Browse files
committed
matrix job
1 parent bf8a7fa commit 2a5b682

File tree

1 file changed

+7
-36
lines changed

1 file changed

+7
-36
lines changed

.github/workflows/main.yml

Lines changed: 7 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ jobs:
6868

6969
distributions:
7070
needs: test
71+
strategy:
72+
matrix:
73+
package_name: ["rsconnect-python", "rsconnect"]
7174
runs-on: ubuntu-latest
7275
steps:
7376
- uses: actions/checkout@v4
@@ -82,6 +85,8 @@ jobs:
8285
- run: pip freeze
8386
- run: make dist
8487
id: create_dist
88+
env:
89+
PACKAGE_NAME: ${{ matrix.package_name }}
8590
- uses: actions/upload-artifact@v4
8691
with:
8792
name: distributions
@@ -101,49 +106,15 @@ jobs:
101106
with:
102107
role-to-assume: ${{ secrets.AWS_ROLE_TO_ASSUME }}
103108
aws-region: ${{ secrets.AWS_REGION }}
104-
- if: github.event_name == 'push' && github.ref == 'refs/heads/main'
109+
- if: github.event_name == 'push' && github.ref == 'refs/heads/main' && matrix.package_name == 'rsconnect-python'
105110
run: make sync-latest-to-s3
106-
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
111+
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') && matrix.package_name == 'rsconnect-python'
107112
run: make sync-to-s3
108113
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
109114
uses: pypa/gh-action-pypi-publish@release/v1
110115
with:
111116
user: __token__
112117
password: ${{ secrets.PYPI_TOKEN }}
113-
114-
publish-rsconnect:
115-
needs: test
116-
runs-on: ubuntu-latest
117-
steps:
118-
- uses: actions/checkout@v4
119-
with:
120-
fetch-depth: 0
121-
env:
122-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
123-
- uses: actions/setup-python@v4
124-
with:
125-
python-version: 3.8.x
126-
- name: Install uv # see scripts/temporary-rename
127-
uses: astral-sh/setup-uv@v5
128-
- run: pip install -e '.[test]'
129-
- run: pip freeze
130-
- run: make dist
131-
id: create_dist
132-
env:
133-
PACKAGE_NAME: rsconnect
134-
- uses: actions/upload-artifact@v4
135-
with:
136-
name: distributions
137-
path: dist/
138-
- run: pip install -vvv ${{ steps.create_dist.outputs.whl }}
139-
- run: rsconnect version
140-
- run: rsconnect --help
141-
- if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
142-
uses: pypa/gh-action-pypi-publish@release/v1
143-
with:
144-
user: __token__
145-
password: ${{ secrets.PYPI_TOKEN }}
146-
147118
docs:
148119
needs: test
149120
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)