-
Notifications
You must be signed in to change notification settings - Fork 1
37 lines (33 loc) · 1.46 KB
/
pypi.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: Publish Python 🐍 distribution 📦 to PyPI and TestPyPI
on:
workflow_dispatch:
jobs:
build:
name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI
runs-on: ubuntu-latest
environment:
name: production
url: https://pypi.org/p/torch-log-wmse
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- uses: actions/checkout@v4
- name: Set up Python 3.8
uses: actions/setup-python@v5
with:
python-version: "3.8"
- name: Install pypa/build and twine
run: |
python3 -m pip install build twine --user
- name: Build and publish torch-log-wmse-audio-quality
run: |
sed -i 's/name = .*/name = torch-log-wmse-audio-quality/' setup.cfg
python3 -m build
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ -u __token__ -p ${{ secrets.TEST_PYPI_API_KEY }} dist/*
python3 -m twine upload --repository-url https://upload.pypi.org/legacy/ -u __token__ -p ${{ secrets.PYPI_API_KEY }} dist/*
- name: Build and publish torch-log-wmse
run: |
sed -i 's/name = .*/name = torch-log-wmse/' setup.cfg
python3 -m build
python3 -m twine upload --repository-url https://test.pypi.org/legacy/ -u __token__ -p ${{ secrets.TEST_PYPI_API_KEY }} dist/*
python3 -m twine upload --repository-url https://upload.pypi.org/legacy/ -u __token__ -p ${{ secrets.PYPI_API_KEY }} dist/*