Skip to content

feat: release

feat: release #50

Workflow file for this run

name: main
on:
pull_request_review:
push:
branches:
- "*"
jobs:
test:
if: false
strategy:
matrix:
os: [ubuntu-latest]
py_ver:
- "3.12"
- "3.11"
- "3.10"
- "3.9"
- "3.8"
pw_browser: [chromium]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.py_ver }}
- uses: pdm-project/setup-pdm@v3
- run: pdm install
- run: pdm list --graph
- run: pdm run playwright install --with-deps ${{ matrix.pw_browser }}
- run: pdm run pytest --browser=${{ matrix.pw_browser }}
release:
if: ${{ github.ref == 'refs/heads/master' }}
# needs:
# - test
strategy:
matrix:
os: [ubuntu-latest]
runs-on: ${{ matrix.os }}
concurrency: release
permissions:
id-token: write
contents: write
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: python-semantic-release/python-semantic-release@v8.7.2
id: release
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
repository_username: ${{ secrets.PDM_PUBLISH_USERNAME }}
repository_password: ${{ secrets.PDM_PUBLISH_PASSWORD }}
# https://python-semantic-release.readthedocs.io/en/latest/migrating_from_v7.html
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
if: steps.release.outputs.released == 'true'
- uses: python-semantic-release/upload-to-gh-release@main
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GITHUB_TOKEN }}