-
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.
- Loading branch information
A.Shpak
committed
Mar 12, 2024
1 parent
61baff4
commit 1d1fa4b
Showing
3 changed files
with
32 additions
and
116 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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: PyPI upload | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-python@v4 | ||
with: | ||
python-version: "3.10" | ||
- uses: actions/checkout@v3 | ||
- name: Extract branch name | ||
shell: bash | ||
run: | | ||
echo "##[set-output name=name;]$(echo ${GITHUB_REPOSITORY#*/})" | ||
echo "##[set-output name=ver;]$(echo ${GITHUB_REF#refs/*/})" | ||
echo "##[set-output name=minor_ver;]$(TMP_VAR=${GITHUB_REF#refs/*/}; echo ${TMP_VAR%.*})" | ||
echo "##[set-output name=major_ver;]$(TMP_VAR=${GITHUB_REF#refs/*/}; echo ${TMP_VAR%.*.*})" | ||
echo "##[set-output name=sha;]$(git rev-parse --short "$GITHUB_SHA")" | ||
id: extract_name_and_version | ||
- run: sed -i 's/0.1.0/'"${{ steps.extract_name_and_version.outputs.ver }}"'/' pyproject.toml | ||
- run: sed -i 's/0.1.0/'"${{ steps.extract_name_and_version.outputs.ver }}"'/' chatushka/__version__.py | ||
- run: python -m pip install poetry~=1.8.0 | ||
- run: poetry build | ||
- run: poetry config http-basic.pypi __token__ ${{ secrets.PYPI_PASS }} | ||
- run: poetry publish |
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 @@ | ||
__version__ = "0.1.0" |