Build and release python package with uv and GitHub Actions workflows

Tag and release python package with uv and GitHub Actions workflows The goal of this article is to build and release python package using uv (for building and publishing) and github actions (for automation). Build and publish name: Package on: push: tags: - "v*.*.*" workflow_dispatch: jobs: build: name: "Build and publish package" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 with: fetch-depth: 0 # for git-versionning - name: Install the latest version of uv uses: astral-sh/setup-uv@v6 with: enable-cache: true - name: Build dist run: uv build - name: Publish packages run: uv publish --token ${{ secrets.TWINE_PASSWORD }} [Optional] Deploy to server jobs: deploy: needs: - build runs-on: ubuntu-latest steps: - name: Deploy to the server uses: https://github.com/appleboy/ssh-action@master with: host: ${{ vars.HOST_MACHINE }} username: ${{ secrets.HOST_SSH_USER }} key: ${{ secrets.HOST_SSH_KEY }} script: | pip install --force-reinstall <package> [Optional] Custom PyPI Package Registry If you are using custom PyPI Package Registry/Index (such as gitea), you can use uv.index entry in pyproject.toml: ...

July 22, 2025 · 3 min

Git Usual Commands

This page describe the usual git commands I used on daily, weekly or monthly basis. Daily push git add -u git commit -m "<changes description>" git push [<remote>] [<branch>] e.g. git add -u git commit -m "add feature" git push origin main Update feature branch from base branch Scenario: you are working on your feature branch ‘dev’ and made a Pull Request targeting ‘main’ as base. Unfortunately, someone pushed changes on the base branch ‘main’ and your feature branch ‘dev’ is “Out-Of-Date”. ...

February 4, 2024 · 2 min