Skip to content

Merge pull request #22 from pieces-app/fix/ci_cd_release_action #2

Merge pull request #22 from pieces-app/fix/ci_cd_release_action

Merge pull request #22 from pieces-app/fix/ci_cd_release_action #2

Workflow file for this run

name: Release
on:
push:
branches: [ main ]
tags:
- '*'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9, 3.10, 3.11]
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install poetry -U
poetry install
- name: Run tests
run: poetry run pytest tests/
- name: Build package
if: startsWith(github.ref, 'refs/tags/v')
run: poetry build
- name: Create Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: dist/
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}