Skip to content

Commit

Permalink
add release to ci
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgafni committed Apr 18, 2024
1 parent 8f70175 commit 5db6562
Show file tree
Hide file tree
Showing 2 changed files with 47 additions and 38 deletions.
47 changes: 47 additions & 0 deletions .github/workflows/check.yml → .github/workflows/CI.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
name: QA & Tests

on:
workflow_dispatch:
push:
release:
types:
- created
# Sequence of patterns matched against refs/tags
tags:
- 'v*' # Push events to matching v*, i.e. v1.0, v20.15.10

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
test:
Expand Down Expand Up @@ -76,3 +88,38 @@ jobs:
run: poetry install --all-extras --sync
- name: Run pre-commit hooks
run: pre-commit run --all-files

qa_success:
name: QA Success
needs: [ test, lint ]
runs-on: ubuntu-latest
steps:
- name: Success
run: echo "QA Succeeded!"

publish:
needs: qa_success
if: contains(github.ref, 'refs/tags/')
name: Publish to PyPI
runs-on: ubuntu-latest
steps:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.9
- uses: actions/checkout@v2
- name: Install and configure Poetry
uses: snok/install-poetry@v1
with:
version: 1.8.2
virtualenvs-create: false
virtualenvs-in-project: false
installer-parallel: true
- name: Install poetry-dynamic-versioning
run: poetry self add poetry-dynamic-versioning@1.2.0
- name: Publish to PyPI
env:
PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }}
run: |
poetry config pypi-token.pypi $PYPI_TOKEN
poetry publish --build
38 changes: 0 additions & 38 deletions .github/workflows/release.yml

This file was deleted.

0 comments on commit 5db6562

Please sign in to comment.