chore: update uv.lock #16
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
name: Package Application | |
on: push | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write # for the PyPI release | |
contents: write # for the GH release | |
steps: | |
- uses: astral-sh/setup-uv@v4 | |
- uses: actions/checkout@v4 | |
- name: Set version from tag or commit SHA | |
run: | | |
case ${{ github.ref }} in | |
refs/tags/v*) | |
VERSION=$(echo ${{ github.ref_name }} | cut -c2-) | |
;; | |
*) | |
VERSION=0.0.0dev+git$(date +%Y%m%d-%H%M)-$(echo ${{ github.sha }} | cut -c1-8) | |
;; | |
esac | |
echo Package will be versioned as $VERSION | |
sed -i "s/NO_VERSION/$VERSION/" hh_creator/__init__.py | |
sed -i "s/0.0.0dev/$VERSION/" pyproject.toml | |
# pyinstaller for windows | |
- name: Export requirements for pyinstaller | |
run: uv pip compile pyproject.toml -o pyinstaller/requirements.txt | |
- uses: ./.github/actions/pyinstaller | |
with: | |
path: pyinstaller | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: hh-creator-${{ github.ref_name }}-windows.zip | |
path: pyinstaller/dist/windows | |
# python package | |
- name: Build PyPI package | |
run: uv build | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: hh-creator-${{ github.ref_name }}-pypi.zip | |
path: dist | |
- name: PyPI release | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: uv publish | |
# github release | |
- name: Zip for github release | |
if: startsWith(github.ref, 'refs/tags/v') | |
run: zip -qq -r hh-creator-${{ github.ref_name }}-windows.zip pyinstaller/dist/windows | |
- name: Github release | |
if: startsWith(github.ref, 'refs/tags/v') | |
uses: softprops/action-gh-release@v2 | |
with: | |
files: | | |
hh-creator-${{ github.ref_name }}-windows.zip | |
dist/* |