We can make this a one-button-click thing with GitHub Actions.
Instructions according to ChatGPT:
Automate Publishing to PyPI with GitHub Actions
Overview
Set up GitHub Actions to automate the process of building and publishing the pyhc-core package to PyPI whenever a new release is created. This will make publishing a new version as simple as clicking a button.
Steps
Step 1: Create a GitHub Actions Workflow
Create a new workflow file:
Create a file at .github/workflows/publish.yml in your repository.
Click on your username in the top-right corner and select "Account settings".
Scroll down to the "API tokens" section.
Click "Add API token".
Provide a name for your token (e.g., "GitHub Actions token").
Set the scope to "Entire account" or specify a project if you want to limit the token's access.
Copy the generated token.
Step 3: Add the API Token to GitHub Secrets
Go to your GitHub repository:
Navigate to the repository where you want to set up the workflow.
Go to Settings:
Click on "Settings" in the repository menu.
Add a new secret:
In the "Secrets and variables" section, click on "Actions".
Click on "New repository secret".
Name the secret PYPI_API_TOKEN.
Paste the API token you copied from PyPI.
Click "Add secret".
Step 4: Create a New Release
Go to the Releases page of your repository:
Click on "Releases" in the right-hand sidebar of your repository's main page.
Create a new release:
Click on "Draft a new release".
Fill in the "Tag version" and "Release title".
Add any release notes if needed.
Click "Publish release".
What Happens Next
When you publish a new release, the GitHub Actions workflow will be triggered.
The workflow will check out the code, set up Python, install the necessary build tools, build the package, and upload it to PyPI using the provided API token.
This setup ensures that publishing a new version to PyPI is as simple as creating a new release on GitHub.
We can make this a one-button-click thing with GitHub Actions.
Instructions according to ChatGPT:
Automate Publishing to PyPI with GitHub Actions
Overview
Set up GitHub Actions to automate the process of building and publishing the
pyhc-core
package to PyPI whenever a new release is created. This will make publishing a new version as simple as clicking a button.Steps
Step 1: Create a GitHub Actions Workflow
Create a new workflow file:
.github/workflows/publish.yml
in your repository.Add the following content to the workflow file:
Step 2: Create a PyPI API Token
Log in to your PyPI account:
Create an API token:
Step 3: Add the API Token to GitHub Secrets
Go to your GitHub repository:
Go to Settings:
Add a new secret:
PYPI_API_TOKEN
.Step 4: Create a New Release
Go to the Releases page of your repository:
Create a new release:
What Happens Next
This setup ensures that publishing a new version to PyPI is as simple as creating a new release on GitHub.