Bump actions/upload-artifact from 5 to 6 #202
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: bnf-pytest | |
| permissions: | |
| contents: read | |
| on: | |
| - pull_request | |
| - push | |
| env: | |
| PYTHON_LATEST_VERSION: '3.14' | |
| jobs: | |
| pytest: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ['3.10', '3.11', '3.12', '3.13', '3.14'] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: install antlr4 | |
| run: pip install antlr4-tools | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| - name: dependencies | |
| working-directory: bnf | |
| run: uv sync --locked --extra dev | |
| - name: pytest | |
| working-directory: bnf | |
| run: uv run pytest | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: pytest | |
| if: "github.event_name == 'push' && startsWith(github.ref, 'refs/tags')" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: recovery tag information | |
| run: git fetch --tags --force | |
| - name: install antlr4 | |
| run: pip install antlr4-tools | |
| - uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| enable-cache: true | |
| - name: build | |
| working-directory: bnf | |
| run: uv build | |
| - uses: actions/upload-artifact@v6 | |
| with: | |
| name: dist | |
| path: bnf/dist/*.whl | |
| upload: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| environment: | |
| name: pypi-bnf | |
| url: https://pypi.org/project/apyds-bnf | |
| permissions: | |
| id-token: write | |
| steps: | |
| - uses: actions/download-artifact@v6 | |
| with: | |
| name: dist | |
| path: dist | |
| - uses: pypa/gh-action-pypi-publish@release/v1 | |
| with: | |
| packages-dir: dist |