@@ -4,54 +4,40 @@ This guide will help you set up automated publishing to PyPI using GitHub Action
44
55## 📋 Prerequisites
66
7- 1 . ** PyPI Account** : Create accounts on both [ PyPI] ( https://pypi.org ) and [ Test PyPI ] ( https://test. pypi.org)
7+ 1 . ** PyPI Account** : Create an account on [ PyPI] ( https://pypi.org )
882 . ** GitHub Repository** : Your Israeli Queue repository on GitHub
993 . ** Admin Access** : You need admin access to the repository to set up secrets
1010
11- ## 🔑 Step 1: Create API Tokens
11+ ## 🔑 Step 1: Create an API Token
1212
13- ### PyPI Production Token
14131 . Go to [ PyPI Account Settings] ( https://pypi.org/manage/account/ )
15142 . Scroll to "API tokens" section
16153 . Click "Add API token"
17164 . Token name: ` IsraeliQueue-GitHub-Actions `
18175 . Scope: "Entire account" (or specific to your project if it exists)
19186 . Copy the token (starts with ` pypi- ` )
2019
21- ### Test PyPI Token
22- 1 . Go to [ Test PyPI Account Settings] ( https://test.pypi.org/manage/account/ )
23- 2 . Repeat the same process as above
24- 3 . Copy the token (starts with ` pypi- ` )
25-
26- ## 🔒 Step 2: Add Secrets to GitHub
20+ ## 🔒 Step 2: Add Secret to GitHub
2721
28221 . Go to your GitHub repository
29232 . Click ** Settings** → ** Secrets and variables** → ** Actions**
30243 . Click ** New repository secret**
31- 4 . Add these secrets :
25+ 4 . Add this secret :
3226
3327| Secret Name | Value | Description |
3428| -------------| -------| -------------|
3529| ` PYPI_API_TOKEN ` | ` pypi-... ` | Your PyPI production token |
36- | ` TEST_PYPI_API_TOKEN ` | ` pypi-... ` | Your Test PyPI token |
3730
38- ## 🌍 Step 3: Create GitHub Environments (Optional)
31+ ## 🌍 Step 3: Create a GitHub Environment (Optional)
3932
40- For additional security, create environments :
33+ For additional security, create an environment :
4134
42351 . Go to ** Settings** → ** Environments**
43- 2 . Create two environments:
44- - ` pypi ` (for production releases)
45- - ` test-pypi ` (for test releases)
36+ 2 . Create environment: ` pypi ` (for production releases)
46373 . Add protection rules if desired (e.g., require reviews)
4738
4839## 🚀 Step 4: How the Workflow Works
4940
50- ### Automatic Test Publishing
51- - ** Trigger** : Push to ` main ` branch
52- - ** Action** : Publishes to Test PyPI automatically
53- - ** Purpose** : Test that packaging works correctly
54-
5541### Production Publishing
5642- ** Trigger** : Create a GitHub release
5743- ** Action** : Publishes to production PyPI
@@ -84,14 +70,10 @@ gh release create v2.0.0 --title "Release v2.0.0" --notes "Major update with imp
8470### Check Workflow Status
8571- Go to ** Actions** tab to see workflow runs
8672- Check for any failures and review logs
87- - Verify packages appear on PyPI/Test PyPI
73+ - Verify the package appears on PyPI
8874
8975### Verify Installation
9076``` bash
91- # Test PyPI
92- pip install -i https://test.pypi.org/simple/ IsraeliQueue
93-
94- # Production PyPI (after release)
9577pip install IsraeliQueue
9678```
9779
@@ -107,7 +89,6 @@ pip install IsraeliQueue
10789** Package Already Exists**
10890- PyPI doesn't allow overwriting versions
10991- Increment version number in your release
110- - Use ` skip-existing: true ` for test uploads
11192
11293** Build Failures**
11394- Check that all tests pass locally
@@ -129,7 +110,6 @@ pip install IsraeliQueue
129110Once set up, your workflow will:
130111
131112- ✅ Run tests on every push
132- - ✅ Publish to Test PyPI on main branch
133113- ✅ Publish to production PyPI on releases
134114- ✅ Generate build artifacts
135115- ✅ Provide security scanning
0 commit comments