Merge pull request #4 from Couchbase-Ecosystem/main #5
This file contains hidden or 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 to PyPI | |
on: | |
push: | |
branches: | |
- production | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
- name: Checkout Repository | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: "3.11" | |
- name: Install Dependencies | |
run: pip3 install pytest streamlit couchbase | |
- name: Unit Tests | |
run: python3 -m pytest src/tests/test_unit.py | |
- name: Install Hatch | |
run: pip install hatch | |
- name: Hatch build | |
run: hatch build | |
- name: Get hatch version | |
id: hatch_version_step | |
run: echo "VERSION=$(hatch version)" >> $GITHUB_OUTPUT | |
- name: Publish release distributions to PyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
- name: Create GitHub Release | |
id: create_release | |
uses: softprops/action-gh-release@v2 | |
with: | |
tag_name: v${{ steps.hatch_version_step.outputs.VERSION }} | |
draft: false | |
prerelease: false |