Skip to content

feat: Config add get function #7

feat: Config add get function

feat: Config add get function #7

Workflow file for this run

name: Deploy
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: 3
- name: Install dependencies
run: |
pip install hatch twine
- name: Version tag and build
run: |
DATE=$(date +%Y.%-m.%-d)
LAST_TAG=$(git describe --tags --abbrev=0)
if [[ "$LAST_TAG" == *"$DATE"* ]]; then
TAG_NUMBER=$(echo "$LAST_TAG" | awk -F. '{print $NF}')
TAG_NUMBER=$((TAG_NUMBER + 1))
else
TAG_NUMBER=1
fi
NEW_TAG="$DATE.${TAG_NUMBER}"
git tag "$NEW_TAG"
git push origin "$NEW_TAG"
hatch version "$NEW_TAG"
hatch build
- name: Upload to PyPI
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
run: twine upload dist/*