chore: resolve merge conflict #10
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: Build and publish package | |
on: | |
push: | |
branches: | |
- master | |
env: | |
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
jobs: | |
release: | |
runs-on: ubuntu-latest | |
concurrency: release | |
permissions: | |
id-token: write | |
contents: write | |
steps: | |
# Checkout the repository | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
# Set-up git user | |
- name: Set-up git user | |
run: | | |
set -e | |
git config user.name "github-actions[bot]" | |
git config user.email "github-actions[bot]@users.noreply.github.com" | |
# Set up Python | |
- uses: actions/setup-python@v1 | |
with: | |
python-version: 3.11 | |
# Set up Poetry | |
- uses: snok/install-poetry@v1 | |
with: | |
virtualenvs-create: true | |
virtualenvs-in-project: true | |
# Load cached dependencies | |
- name: Load cached venv | |
id: cache-dependencies | |
uses: actions/cache@v3 | |
with: | |
path: .venv | |
key: venv-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }} | |
# Install dependencies | |
- if: steps.cache-dependencies.outputs.cache-hit != 'true' | |
run: poetry install --without test,dev | |
# Version package | |
- run: poetry run semantic-release version | |
# Configure basic credentials for PyPI | |
- run: poetry config pypi-token.pypi "${{ secrets.PYPI_PASSWORD }}" | |
# Build and publish package | |
- run: poetry build | |
- run: poetry publish |