Beta Release - 2.0.1 #18
Workflow file for this run
This file contains 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: | |
release: | |
types: | |
- published | |
workflow_dispatch: | |
branches: ["master"] | |
permissions: | |
contents: read | |
jobs: | |
pypi-publish: | |
name: Publish Release | |
runs-on: "ubuntu-latest" | |
environment: | |
name: pypi | |
url: https://pypi.org/p/hexital | |
permissions: | |
id-token: write | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v3 | |
with: | |
python-version: "3.10" | |
- name: Install and configure Poetry | |
uses: snok/[email protected] | |
with: | |
version: 1.5.1 | |
- name: Load cached venv | |
id: cached-poetry-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/poetry.lock') }} | |
- name: Install dependencies | |
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --no-interaction --no-root | |
- run: poetry config pypi-token.pypi "${{ secrets.PYPI_TOKEN }}" | |
- name: Build and Publish package to PyPI | |
run: poetry publish --build |