Skip to content

Conversation

anton-ptashnik
Copy link
Contributor

@anton-ptashnik anton-ptashnik commented Sep 17, 2023

This PR intends to assist with publishing the package to PyPI by:

Initial setup to allow package publishing

  1. Login to https://pypi.org/ (create an account if missing)
  2. Generate a token
    2.1. Go to Account Settings -> API tokens
    2.2. Create a new token. Name - any, Scope - entire account
  3. Put the token into GitHub secrets for the repo
    3.1. Go to the repo settings -> Secret and Variables
    3.2. Create a new secret with name=PYPI_TOKEN and value=generated token

Steps to publish a package

Note these steps need to be done after the PR is merged so release is done on this original repo rather than on the fork.

  1. Go to Releases of the repo
  2. Create a new release:
    2.1. Create a new version tag, v0.1.0 for the first release
    2.2. Press Generate release notes. It makes release name == tag name and puts a default description
    2.3. Optional. Modify the description to explain changes better if needed
    2.4. Submit

Once done, GitHub starts a publish action and the package will appear on PyPI in a few seconds

@@ -5,6 +5,8 @@

Use the GoDice Python API to integrate GoDice functionality into your own Python applications

![PyPI - Version](https://img.shields.io/pypi/v/godice)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a badge will render correctly after publishing the package

@@ -4,7 +4,17 @@ build-backend = "flit_core.buildapi"

[project]
name = "godice"
authors = [{name = "Particula", email = "iavtomator@gmail.com"}]
authors = [
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Geek5510 please update/extend authors list as needed. I recognize my work was based on knowledge of others about device API

{name = "Guy Levi", email = "todo_update@it.com"},
{name = "Anton Ptashnik", email = "iavtomator@gmail.com"},
]
license = {file = "LICENSE.md"}
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Geek5510 I'm not strong in licensing but I'm almost sure a published package should have a correct one. I see the repo has some custom license while open source projects usually have MIT or similar one.
Please review if the current license still fits and make changes if needed

@Geek5510
Copy link
Collaborator

Thank you for your suggestions and work! we'll check about the licensing and see what can we do

@ParticulaCode ParticulaCode merged commit 133a3f7 into ParticulaCode:main Sep 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants