Skip to content

Commit

Permalink
ci: parametrize publish (#16343)
Browse files Browse the repository at this point in the history
  • Loading branch information
Borda authored Jan 12, 2023
1 parent 388f2f4 commit e7eddbd
Showing 1 changed file with 10 additions and 28 deletions.
38 changes: 10 additions & 28 deletions .github/workflows/release-pypi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ jobs:
runs-on: ubuntu-20.04
needs: build-packages
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
strategy:
matrix:
name: ["APP", "FABRIC", "PYTORCH", "LIGHTNING"]
steps:
- uses: actions/checkout@v3 # needed for local action bellow
- uses: actions/download-artifact@v3
Expand All @@ -132,26 +135,17 @@ jobs:
tree -L 2 -h dist/
- uses: ./.github/actions/pkg-publish
with:
pkg-folder: dist/app
pypi-test-token: ${{ secrets.PYPI_TEST_TOKEN_APP }}
- uses: ./.github/actions/pkg-publish
with:
pkg-folder: dist/fabric
pypi-test-token: ${{ secrets.PYPI_TEST_TOKEN_FABRIC }}
- uses: ./.github/actions/pkg-publish
with:
pkg-folder: dist/pytorch
pypi-test-token: ${{ secrets.PYPI_TEST_TOKEN_PYTORCH }}
- uses: ./.github/actions/pkg-publish
with:
pkg-folder: dist/lightning
pypi-test-token: ${{ secrets.PYPI_TEST_TOKEN_LAI }}
pkg-folder: dist/$(echo 'console.log("${{ matrix.name }}".toLowerCase())')
pypi-test-token: ${{ secrets[format('PYPI_TEST_TOKEN_{0}', matrix.name)] }}


publish-packages:
runs-on: ubuntu-20.04
needs: [build-packages, waiting]
if: startsWith(github.event.ref, 'refs/tags') || github.event_name == 'release'
strategy:
matrix:
name: ["APP", "FABRIC", "PYTORCH", "LIGHTNING"]
steps:
- uses: actions/checkout@v3 # needed for local action bellow
- uses: actions/download-artifact@v3
Expand All @@ -163,20 +157,8 @@ jobs:
tree -L 2 -h dist/
- uses: ./.github/actions/pkg-publish
with:
pkg-folder: dist/app
pypi-token: ${{ secrets.PYPI_TOKEN_APP }}
- uses: ./.github/actions/pkg-publish
with:
pkg-folder: dist/fabric
pypi-token: ${{ secrets.PYPI_TOKEN_FABRIC }}
- uses: ./.github/actions/pkg-publish
with:
pkg-folder: dist/pytorch
pypi-token: ${{ secrets.PYPI_TOKEN_PYTORCH }}
- uses: ./.github/actions/pkg-publish
with:
pkg-folder: dist/lightning
pypi-token: ${{ secrets.PYPI_TOKEN_LAI }}
pkg-folder: dist/$(echo 'console.log("${{ matrix.name }}".toLowerCase())')
pypi-token: ${{ secrets[format('PYPI_TOKEN_{0}', matrix.name)] }}


legacy-checkpoints:
Expand Down

0 comments on commit e7eddbd

Please sign in to comment.