Skip to content

Commit

Permalink
Update RAISING.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Devashish13 authored Nov 25, 2024
1 parent dcc5fda commit 131e9c1
Showing 1 changed file with 17 additions and 53 deletions.
70 changes: 17 additions & 53 deletions .github/workflows/RAISING.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,59 +8,23 @@ permissions:
contents: read

jobs:
release-build:
deploy:
runs-on: ubuntu-latest

steps:
# Step 1: Checkout the repository
- uses: actions/checkout@v4

# Step 2: Set up Python environment
- uses: actions/setup-python@v5
with:
python-version: "3.x"

# Step 3: Install dependencies and build the package
- name: Build release distributions
run: |
python -m pip install --upgrade pip setuptools wheel twine build
python -m build
# Step 4: Validate metadata before publishing
- name: Validate metadata
run: |
python -m pip install twine
twine check dist/*
# Step 5: Upload built artifacts
- name: Upload distributions
uses: actions/upload-artifact@v4
with:
name: release-dists
path: dist/

pypi-publish:
runs-on: ubuntu-latest
needs:
- release-build
permissions:
id-token: write

environment:
name: pypi
# OPTIONAL: Add PyPI project URL for deployment status tracking
# url: https://pypi.org/project/YOURPROJECT/

steps:
# Step 1: Retrieve the built artifacts
- name: Retrieve release distributions
uses: actions/download-artifact@v4
with:
name: release-dists
path: dist/

# Step 2: Publish to PyPI
- name: RAISING
uses: pypa/gh-action-pypi-publish@release/v1
with:
packages-dir: dist/
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install build
- name: Build package
run: python -m build
- name: RAISING
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}

0 comments on commit 131e9c1

Please sign in to comment.