Skip to content

Commit 2d489e8

Browse files
committed
adding fix for yml file
1 parent 4488ec2 commit 2d489e8

File tree

1 file changed

+16
-25
lines changed

1 file changed

+16
-25
lines changed
Lines changed: 16 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,39 +1,30 @@
1-
# This workflow will upload a Python Package using Twine when a release is created
2-
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python#publishing-to-package-registries
3-
4-
# This workflow uses actions that are not certified by GitHub.
5-
# They are provided by a third-party and are governed by
6-
# separate terms of service, privacy policy, and support
7-
# documentation.
8-
9-
name: Upload Python Package
1+
name: Upload Python Package to PyPI when a Release is Created
102

113
on:
124
release:
135
types: [created]
146

157
jobs:
16-
build:
8+
pypi-publish:
9+
name: Publish release to PyPI
1710
runs-on: ubuntu-latest
18-
11+
environment:
12+
name: pypi
13+
url: https://pypi.org/p/ramlfications
14+
permissions:
15+
id-token: write
1916
steps:
20-
- name: Checkout code
21-
uses: actions/checkout@v2
22-
17+
- uses: actions/checkout@v4
2318
- name: Set up Python
24-
uses: actions/setup-python@v2
19+
uses: actions/setup-python@v4
2520
with:
26-
python-version: '3.10, 3.11, 3.12'
27-
21+
python-version: "3.x"
2822
- name: Install dependencies
2923
run: |
3024
python -m pip install --upgrade pip
31-
pip install setuptools wheel twine
32-
33-
- name: Build and publish
25+
pip install setuptools wheel
26+
- name: Build package
3427
run: |
35-
python setup.py sdist bdist_wheel
36-
python -m twine upload --skip-existing --repository pypi dist/*
37-
env:
38-
TWINE_USERNAME: __token__
39-
TWINE_PASSWORD: ${{ secrets.GITHUB_TOKEN }}
28+
python setup.py sdist bdist_wheel # Could also be python -m build
29+
- name: Publish package distributions to PyPI
30+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)