Skip to content

Commit e1ebe43

Browse files
authored
Create release.yaml
1 parent d237c17 commit e1ebe43

File tree

1 file changed

+52
-0
lines changed

1 file changed

+52
-0
lines changed

.github/workflows/release.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
name: Build and publish Python packages to PyPI
2+
3+
on:
4+
workflow_dispatch:
5+
release:
6+
types:
7+
- published
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
strategy:
13+
matrix:
14+
python-version:
15+
- "3.10"
16+
steps:
17+
- uses: actions/checkout@v3
18+
19+
- uses: actions/setup-python@v4
20+
with:
21+
python-version: ${{ matrix.python-version }}
22+
cache: pip
23+
24+
- name: Install build tool
25+
run: pip install build
26+
27+
- name: Build package
28+
run: python -m build
29+
30+
- name: Upload package as build artifact
31+
uses: actions/upload-artifact@v3
32+
with:
33+
name: package
34+
path: dist/
35+
36+
publish:
37+
runs-on: ubuntu-latest
38+
needs: build
39+
environment:
40+
name: pypi
41+
url: https://pypi.org/p/gpt-engineer
42+
permissions:
43+
id-token: write
44+
steps:
45+
- name: Collect packages to release
46+
uses: actions/download-artifact@v3
47+
with:
48+
name: package
49+
path: dist/
50+
51+
- name: Publish packages to PyPI
52+
uses: pypa/gh-action-pypi-publish@release/v1

0 commit comments

Comments
 (0)