new: simplified cli and temp removal of tests from workflow #102
Workflow file for this run
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 drp-dev to PyPI | |
| # Dev branch → publishes "drp-dev" package. | |
| # No tags, no GitHub releases — just PyPI. | |
| on: | |
| push: | |
| branches: [dev] | |
| paths: | |
| - 'cli/**' | |
| - 'pyproject.toml' | |
| - 'VERSION' | |
| - '.github/workflows/publish-dev.yml' | |
| permissions: | |
| contents: read | |
| jobs: | |
| # test: | |
| # strategy: | |
| # fail-fast: true | |
| # max-parallel: 1 | |
| # matrix: | |
| # os: [ubuntu-latest, macos-latest, windows-latest] | |
| # python-version: ['3.10'] | |
| # runs-on: ${{ matrix.os }} | |
| # steps: | |
| # - uses: actions/checkout@v4 | |
| # - uses: actions/setup-python@v5 | |
| # with: | |
| # python-version: ${{ matrix.python-version }} | |
| # - name: Install requirements | |
| # run: pip install -r requirements.txt | |
| # - name: Reset DB and create test users | |
| # run: python manage.py drop --yes | |
| # env: | |
| # SUPERUSER: ${{ secrets.SUPERUSER }} | |
| # SUPERPASS: ${{ secrets.SUPERPASS }} | |
| # DB_URL: ${{ secrets.DB_URL }} | |
| # B2_KEY_ID: ${{ secrets.B2_KEY_ID }} | |
| # B2_APP_KEY: ${{ secrets.B2_APP_KEY }} | |
| # - name: Run tests | |
| # run: pytest | |
| # env: | |
| # DJANGO_SETTINGS_MODULE: project.settings | |
| # DRP_TEST_TOKEN: ${{ secrets.DRP_TEST_TOKEN }} | |
| # DRP_TEST_TOKEN_2: ${{ secrets.DRP_TEST_TOKEN_2 }} | |
| # ISSUES_TOKEN_GITHUB: ${{ secrets.ISSUES_TOKEN_GITHUB }} | |
| # RESEND_API_KEY: ${{ secrets.RESEND_API_KEY }} | |
| # TEST_RECIPIENT_EMAIL: ${{ secrets.TEST_RECIPIENT_EMAIL }} | |
| # DB_URL: ${{ secrets.DB_URL }} | |
| # B2_KEY_ID: ${{ secrets.B2_KEY_ID }} | |
| # B2_APP_KEY: ${{ secrets.B2_APP_KEY }} | |
| # DOMAIN: ${{ vars.DOMAIN }} | |
| # ── Publish drp-dev (no tags, no releases) ──────────────────────────────── | |
| publish: | |
| # needs: test | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: publish-dev | |
| cancel-in-progress: false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.10' | |
| - name: Compute version from PyPI | |
| id: version | |
| run: | | |
| base=$(cat VERSION | tr -d '[:space:]') | |
| pkg="drp-dev" | |
| latest=$(curl -sf "https://pypi.org/pypi/${pkg}/json" \ | |
| | python3 -c "import sys,json; print(json.load(sys.stdin)['info']['version'])" 2>/dev/null || echo "") | |
| if [ -n "$latest" ] && echo "$latest" | grep -q "^${base}\."; then | |
| patch=$(echo "$latest" | cut -d. -f3) | |
| version="${base}.$((patch + 1))" | |
| else | |
| version="${base}.0" | |
| fi | |
| echo "version=$version" >> "$GITHUB_OUTPUT" | |
| echo "Publishing ${pkg} ${version} (latest on PyPI: ${latest:-none})" | |
| - name: Stamp version | |
| run: echo '${{ steps.version.outputs.version }}' > VERSION | |
| - name: Build drp-dev | |
| run: pip install build && python -m build | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| user: __token__ | |
| password: ${{ secrets.PYPI_API_TOKEN }} |