diff --git a/.github/workflows/tag_release.yml b/.github/workflows/tag_release.yml new file mode 100644 index 0000000..b25cfad --- /dev/null +++ b/.github/workflows/tag_release.yml @@ -0,0 +1,40 @@ +name: tag-release + +on: + push: + # Pattern matched against refs/tags + tags: + - 'v*' # This includes only tags starting with v + +jobs: + build-source: + runs-on: ubuntu-latest + permissions: + contents: write + id-token: write + # Dedicated environments with protections for publishing are strongly recommended. + environment: + name: release + # OPTIONAL: uncomment and update to include your PyPI project URL in the deployment status: + # url: https://pypi.org/p/YOURPROJECT + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-python@v5 + with: + python-version: "3.10" + cache: "pip" + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install build + - name: Build source Python package + run: python -m build -s -o dist . + - name: Publish release distributions to PyPI + uses: pypa/gh-action-pypi-publish@release/v1 + - name: Release + uses: softprops/action-gh-release@v2 + with: + files: | + ./dist/** + +