Skip to content

Commit b6c3a65

Browse files
committed
ci: add publish.yml
1 parent 970b4b5 commit b6c3a65

File tree

1 file changed

+46
-0
lines changed

1 file changed

+46
-0
lines changed

.github/workflows/publish.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
tags:
6+
- '*.*.*'
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
pypi-publish:
13+
name: Upload release to PyPI
14+
runs-on: ubuntu-latest
15+
environment:
16+
name: pypi
17+
url: https://pypi.org/project/pgmq-sqlalchemy/
18+
permissions:
19+
id-token: write
20+
steps:
21+
- name: Checkout code
22+
uses: actions/checkout@v4
23+
24+
- name: Set up Python 3.10
25+
uses: actions/setup-python@v5
26+
with:
27+
python-version: "3.10"
28+
29+
- name: Install Poetry
30+
run: |
31+
curl -sSL https://install.python-poetry.org | python - -y
32+
33+
- name: Update PATH
34+
run: echo "$HOME/.local/bin" >> $GITHUB_PATH
35+
36+
- name: Update Poetry configuration
37+
run: poetry config virtualenvs.create false
38+
39+
- name: Install dependencies
40+
run: poetry install --sync --no-interaction --without=dev
41+
42+
- name: Package project
43+
run: poetry build
44+
45+
- name: Publish package distributions to PyPI
46+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)