Skip to content
This repository has been archived by the owner on Aug 4, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1 from nathanw-mlc/pypi-trusted-publisher-impleme…
Browse files Browse the repository at this point in the history
…ntation

TestPyPi trusted publisher implementation
  • Loading branch information
nathanw-mlc authored Aug 2, 2023
2 parents 8bc7f13 + d0a3d8e commit 95470a3
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 154 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,6 @@ More Information on python-publish action & Repository Dispatch action can be fo
### Secrets used
| Name | |
|---|---|
|PYPI_USER |pypi login credentials used in GitHub workflows |
|PYPI_PASSWORD |pypi login credentials used in GitHub workflows |
|PYPI_USER (depreciated) |pypi login credentials used in GitHub workflows |
|PYPI_PASSWORD (depreciated) |pypi login credentials used in GitHub workflows |
|MLCOMMONS_REPO_ACCESS |public_repo ACL for request dispatch in GitHub workflows |
8 changes: 4 additions & 4 deletions .github/workflows/python-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v2
- name: Set up Python
Expand All @@ -27,12 +29,10 @@ jobs:
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USER }}
verify_metadata: true
skip_existing: true
password: ${{ secrets.PYPI_PASSWORD }}
packages_dir: mlcube/dist/
repository_url: https://upload.pypi.org/legacy/
repository_url: https://test.pypi.org/legacy/
verbose: true
env:
LOGLEVEL: DEBUG
Expand All @@ -45,5 +45,5 @@ jobs:
uses: peter-evans/repository-dispatch@v1
with:
token: ${{ secrets.MLCOMMONS_REPO_ACCESS }}
repository: mlcommons/mlcube
repository: nathanw-mlc/mlcube
event-type: publish-runners
151 changes: 3 additions & 148 deletions .github/workflows/runner-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,10 @@ on:
repository_dispatch:
types: publish-runners

jobs:
ssh_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build distribution
run: |
cd runners/mlcube_ssh
python setup.py sdist bdist_wheel
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USER }}
verify_metadata: true
skip_existing: true
password: ${{ secrets.PYPI_PASSWORD }}
packages_dir: runners/mlcube_ssh/dist/
repository_url: https://upload.pypi.org/legacy/
env:
LOGLEVEL: DEBUG

docker_deploy:
runs-on: ubuntu-latest
permissions:
id-token: write
steps:
- uses: actions/checkout@v2
- name: Set up Python
Expand All @@ -55,128 +28,10 @@ jobs:
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USER }}
verify_metadata: true
skip_existing: true
password: ${{ secrets.PYPI_PASSWORD }}
packages_dir: runners/mlcube_docker/dist/
repository_url: https://upload.pypi.org/legacy/
verbose: true
env:
LOGLEVEL: DEBUG

singularity_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build distribution
run: |
cd runners/mlcube_singularity
python setup.py sdist bdist_wheel
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USER }}
verify_metadata: true
skip_existing: true
password: ${{ secrets.PYPI_PASSWORD }}
packages_dir: runners/mlcube_singularity/dist/
repository_url: https://upload.pypi.org/legacy/
verbose: true
env:
LOGLEVEL: DEBUG

kubernetes_runner_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build distribution
run: |
cd runners/mlcube_k8s
python setup.py sdist bdist_wheel
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USER }}
verify_metadata: true
skip_existing: true
password: ${{ secrets.PYPI_PASSWORD }}
packages_dir: runners/mlcube_k8s/dist/
repository_url: https://upload.pypi.org/legacy/
verbose: true
env:
LOGLEVEL: DEBUG

gcp_runner_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build distribution
run: |
cd runners/mlcube_gcp
python setup.py sdist bdist_wheel
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USER }}
verify_metadata: true
skip_existing: true
password: ${{ secrets.PYPI_PASSWORD }}
packages_dir: runners/mlcube_gcp/dist/
repository_url: https://upload.pypi.org/legacy/
repository_url: https://test.pypi.org/legacy/
verbose: true
env:
LOGLEVEL: DEBUG

kubeflow_runner_deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build distribution
run: |
cd runners/mlcube_kubeflow
python setup.py sdist bdist_wheel
- name: Publish
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: ${{ secrets.PYPI_USER }}
verify_metadata: true
skip_existing: true
password: ${{ secrets.PYPI_PASSWORD }}
packages_dir: runners/mlcube_kubeflow/dist/
repository_url: https://upload.pypi.org/legacy/
verbose: true
env:
LOGLEVEL: DEBUG

0 comments on commit 95470a3

Please sign in to comment.