Merge pull request #34 from chriscarrollsmith/fix/32-upload-response-… #16
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: release | |
| on: | |
| push: | |
| branches: [main] | |
| permissions: | |
| id-token: write | |
| contents: read | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.10", "3.13"] | |
| os: [ubuntu-latest] | |
| defaults: | |
| run: | |
| shell: bash | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies and run tests | |
| env: | |
| ZOTERO_API_KEY: ${{ secrets.ZOTERO_API_KEY }} | |
| ZOTERO_LIBRARY_ID: ${{ secrets.ZOTERO_LIBRARY_ID }} | |
| ZOTERO_LIBRARY_TYPE: ${{ secrets.ZOTERO_LIBRARY_TYPE }} | |
| ZOTERO_USERNAME: ${{ secrets.ZOTERO_USERNAME }} | |
| ZOTERO_TEST_GROUP_ID: ${{ secrets.ZOTERO_TEST_GROUP_ID }} | |
| run: | | |
| uv sync | |
| uv run pytest tests | |
| release: | |
| needs: test | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v5 | |
| - name: "Set up Python" | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version-file: "pyproject.toml" | |
| - name: Build project wheel and test that it installs without errors | |
| run: | | |
| uv build | |
| uv venv | |
| uv pip install dist/pyzotero_cli-*.whl | |
| - name: Release to PyPI | |
| uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: dist/ |