Skip to content

Commit 5863622

Browse files
authored
chore: fix release workflow
1 parent 5ff4494 commit 5863622

File tree

1 file changed

+22
-8
lines changed

1 file changed

+22
-8
lines changed

.github/workflows/deploy.yml

Lines changed: 22 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,12 @@ name: Deploy to PyPI
22

33
on:
44
push:
5-
branches:
6-
- main
5+
branches: [ 'main' ]
76
workflow_dispatch:
7+
8+
env:
9+
PYTHON_VERSION_DEFAULT: "3.10"
10+
POETRY_VERSION: "1.1.12"
811

912
jobs:
1013
release:
@@ -19,22 +22,33 @@ jobs:
1922
uses: actions/checkout@v3
2023
with:
2124
fetch-depth: 0
25+
2226
- name: Setup python
2327
# see https://github.com/actions/setup-python
2428
uses: actions/setup-python@v4
2529
with:
26-
python-version: 3.9
30+
python-version: ${{ env.PYTHON_VERSION_DEFAULT }}
31+
architecture: 'x64'
32+
33+
- name: Install and configure Poetry
34+
# See https://github.com/marketplace/actions/install-poetry-action
35+
uses: snok/install-poetry@v1
36+
with:
37+
version: ${{ env.POETRY_VERSION }}
38+
virtualenvs-create: true
39+
virtualenvs-in-project: true
40+
installer-parallel: true
41+
2742
- name: Install dependencies
28-
run: |
29-
python -m pip install poetry --upgrade pip
30-
poetry config virtualenvs.create false
31-
poetry install
43+
run: poetry install --no-root
44+
3245
- name: View poetry version
3346
run: poetry --version
47+
3448
- name: Python Semantic Release
3549
# see https://python-semantic-release.readthedocs.io/en/latest/automatic-releases/github-actions.html
3650
# see https://github.com/relekang/python-semantic-release
37-
uses: relekang/python-semantic-release@v7.29.5
51+
uses: relekang/python-semantic-release@v7.31.2
3852
with:
3953
github_token: ${{ secrets.GITHUB_TOKEN }}
4054
repository_username: __token__

0 commit comments

Comments
 (0)