Skip to content

Commit ba5aae3

Browse files
committed
chore(coverage.yml): update workflow name to 'Coverage' for consistency
feat(release.yml): add new workflow 'Release' to automate package publishing to PyPI chore(tests.yml): update workflow name to 'Tests' for consistency
1 parent afcdab5 commit ba5aae3

File tree

3 files changed

+34
-2
lines changed

3 files changed

+34
-2
lines changed

.github/workflows/coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Collect coverage and upload to Codecov
1+
name: Coverage
22
on:
33
push:
44
branches:

.github/workflows/release.yml

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
name: Release
2+
on:
3+
workflow_run:
4+
workflows: ["Tests"]
5+
types:
6+
- completed
7+
8+
jobs:
9+
release:
10+
runs-on: ubuntu-22.04
11+
steps:
12+
- uses: actions/checkout@v4
13+
- uses: actions/setup-python@v4
14+
with:
15+
python-version: "3.12"
16+
- name: Install Poetry
17+
uses: abatilo/actions-poetry@v2
18+
- name: Setup a local virtual environment
19+
run: |
20+
poetry config virtualenvs.create true --local
21+
poetry config virtualenvs.in-project true --local
22+
- uses: actions/cache@v3
23+
name: Define a cache for the virtual environment based on the dependencies lock file
24+
with:
25+
path: ./.venv
26+
key: venv-${{ hashFiles('poetry.lock') }}
27+
- name: Install dependencies
28+
run: poetry install
29+
- name: Configure poetry for publishing
30+
run: poetry config pypi-token.pypi ${{ secrets.PYPI_TOKEN }}
31+
- name: Publish package to PyPI
32+
run: poetry publish --build

.github/workflows/tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Run tests
1+
name: Tests
22
on:
33
push:
44
branches:

0 commit comments

Comments
 (0)