Publish Package #17
Workflow file for this run
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] | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
name: "Publish library" | |
steps: | |
- name: Check out | |
uses: actions/checkout@v4 | |
with: | |
token: "${{ secrets.GITHUB_TOKEN }}" | |
fetch-depth: 0 | |
- name: Set up uv | |
run: curl -LsSf https://astral.sh/uv/install.sh | sh | |
- name: Build package | |
run: | | |
VERSION=$(uvx dunamai from any --no-metadata --style pep440).$(date +"%Y%m%d") | |
echo $VERSION | |
sed -i'' -E "s/version = \"0.0.0\"/version = \"$VERSION\"/g" pyproject.toml | |
uvx --from build pyproject-build --installer uv | |
- name: Publish package distributions to PyPI | |
id: publish-pypi | |
uses: pypa/gh-action-pypi-publish@release/v1 |