action test #13
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: Publish Package | |
on: | |
# release: | |
# types: [created] | |
push: | |
branches: ["main"] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
name: "Publish library" | |
strategy: | |
matrix: | |
python-version: ["3.12"] | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
with: | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
fetch-depth: 0 | |
- name: Install python | |
uses: actions/setup-python@v4 | |
id: install-python | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install uv | |
uses: yezz123/setup-uv@v4 | |
id: install-uv | |
- name: Export version | |
id: export-version | |
run: | | |
VERSION=$(uvx dunamai from any --no-metadata --style pep440).$(date +"%Y%m%d") | |
echo "version=$VERSION" >> $GITHUB_OUTPUT | |
- name: Bump version | |
uses: ciiiii/toml-editor@1.0.0 | |
with: | |
file: "pyproject.toml" | |
key: "version" | |
value: "${{ steps.export-version.outputs.version }}" | |
- name: Build package | |
run: | | |
uvx --from build pyproject-build --installer uv | |
# - name: Release to PyPI | |
# run: | | |
# uvx twine upload dist/* --non-interactive \ | |
# --username __token__ --password ${{ secrets.PYPI_API_TOKEN }} |