Skip to content

Commit

Permalink
-
Browse files Browse the repository at this point in the history
  • Loading branch information
A.Shpak committed Mar 12, 2024
1 parent 61baff4 commit 1d1fa4b
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 116 deletions.
116 changes: 0 additions & 116 deletions .github/workflows/build.yml

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/pypi.yml
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
1 change: 1 addition & 0 deletions chatushka/__version__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
__version__ = "0.1.0"

0 comments on commit 1d1fa4b

Please sign in to comment.