Skip to content

fix(actions): use supported actions for releases #32

fix(actions): use supported actions for releases

fix(actions): use supported actions for releases #32

Workflow file for this run

name: release
on:
workflow_dispatch:
push:
branches:
- "main"
jobs:
Quality:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install Python Poetry
uses: abatilo/[email protected]
with:
poetry-version: 1.1.12
- name: Configure poetry
shell: bash
run: python -m poetry config virtualenvs.in-project true
- name: View poetry version
run: poetry --version
- name: Install dependencies
run: |
python -m poetry install
- name: Lint with flake8
run: |
python -m poetry run flake8
# - name: Test with pytest
# run: |
# python -m poetry run python -m pytest -v tests
Release:
needs: Quality
# https://github.community/t/how-do-i-specify-job-dependency-running-in-another-workflow/16482
if: "!contains(github.event.head_commit.message, 'chore(release):')"
runs-on: ubuntu-latest
steps:
- uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0
- name: Python Semantic Release
id: release
uses: relekang/[email protected]
with:
github_token: ${{ secrets.GH_TOKEN }}
- name: Publish package distributions to PyPI
id: pypi
uses: pypa/[email protected]
if: steps.release.outputs.released == 'true'
with:
password: ${{ secrets.PYPI_TOKEN }}
- name: Publish package distributions to GitHub Releases
id: github
uses: python-semantic-release/upload-to-gh-release@main
if: steps.release.outputs.released == 'true'
with:
github_token: ${{ secrets.GH_TOKEN }}