https://github.com/firebolt-db/action-python-release
GitHub Action for python project release in pypi and github
https://github.com/firebolt-db/action-python-release
Last synced: about 1 month ago
JSON representation
GitHub Action for python project release in pypi and github
- Host: GitHub
- URL: https://github.com/firebolt-db/action-python-release
- Owner: firebolt-db
- Created: 2022-01-11T13:31:56.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-19T15:05:16.000Z (6 months ago)
- Last Synced: 2025-04-29T21:18:03.307Z (about 1 month ago)
- Language: Python
- Size: 21.5 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Python release
GitHub Action for python project release in pypi and github
## Inputs
### `pre-release-tag`
**Required:** Tag for pre-release. e.g. v1.0.1-*alpha*. If release is not a pre-release leave blank.
Example: `pre-release-tag: alpha`
### `major-release`
**Required:** Trigger a major release. Any non-empty value here indicates it's a major release. If not a major release leave blank.
Example: `major-release: true`
### `pypi-username`
**Required:** Pypi username for deployment
### `pypi-password`
**Required:** Pypi password for deployment
### `version-file-path`
**Required:** Path to the file containing __version__ = , where version_number will be incremented and commited to the main branch. This should be a relative path from the root of the repo.
### `main-branch`
**Optional:** Name of the default branch in the repo. Usually is main or master (old). Defaults to main.## Known limitations
1. Despite `pre-release-tag` and `major-release` being required parameters, they're optional in real world. This action is supposed to be manually submitted when the release time comes. Since action inputs are always defined, in nothing's passed they will hold an empty string.
## Example
**Please note** the need to set permissions to write in order to be able to create GitHub releases.
```yml
on:
workflow_dispatch:
inputs:
pre-release-tag:
required: false
description: 'Tag for pre-release (optional)'
major-release:
required: false
description: 'Trigger a major release (optional). Leave empty for regular release.'
jobs:
publish:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Check out code
uses: actions/checkout@v2
with:
fetch-depth: 0
token: ${{ secrets.RELEASE_PAT }}- name: 'Publish action'
uses: firebolt-db/action-python-release@main
with:
pre-release-tag: ${{ inputs.pre-release-tag }}
major-release: ${{ inputs.major-release }}
pypi-username: ${{ secrets.PYPI_USERNAME }}
pypi-password: ${{ secrets.PYPI_PASSWORD }}
```