-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update setup-python version, add publish workflow
- Update setup-python version from v3 to v5 in linting workflow - Add new publish workflow for PyPI with necessary steps
- Loading branch information
1 parent
cae81ed
commit 4ff1313
Showing
2 changed files
with
32 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Publish to PyPI | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
|
||
- name: Install Poetry | ||
run: pipx install poetry | ||
|
||
- name: Get Tag Name | ||
id: get_and_remove_v_from_tag | ||
run: | | ||
TAG_NAME="${{ github.ref_name }}" | ||
TAG_NAME="${TAG_NAME:1}" # Remove the first character (leading 'v') | ||
echo "VERSION=${TAG_NAME}" >> $GITHUB_ENV | ||
- name: Build & Upload | ||
env: | ||
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} | ||
run: | | ||
poetry config pypi-token.pypi $PYPI_TOKEN | ||
poetry version $VERSION | ||
poetry build | ||
poetry publish |