-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (37 loc) · 1.21 KB
/
publish_pypi_real.yaml
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
38
name: 🤖 Publish latest library to PyPI fossbot-lib-real
on: [workflow_dispatch]
jobs:
docker:
runs-on: ubuntu-latest
steps:
- name: Get latest release of NodeJS
uses: rez0n/actions-github-release@main
id: fosslib
env:
token: ${{ secrets.GITHUB_TOKEN }}
repository: "chronis10/fossbot-source"
type: "stable"
- name: Checkout code
uses: actions/checkout@v2
- name: Rename setup file
run: mv setup_real.py setup.py
- name: Set env var
run: echo "PYPI_VERSION=${{ steps.fosslib.outputs.release }}" >> $GITHUB_ENV
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel twine
- name: Build distribution
run: |
python setup.py sdist bdist_wheel
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@v1.5.0
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN_REAL }}
repository_url: https://upload.pypi.org/legacy/
package_dir: ./dist