Skip to content

Commit 39142e8

Browse files
author
Manesh George
committed
new ci release changes and documents
1 parent 41ca39a commit 39142e8

File tree

3 files changed

+48
-49
lines changed

3 files changed

+48
-49
lines changed

.github/workflows/python-publish.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/release.yml

Lines changed: 32 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,34 @@
1-
# name: Publish package
21

3-
# on: [ push ]
2+
name: Publish to PyPi
43

5-
# jobs:
6-
# publish:
7-
# if: startsWith(github.ref, 'refs/tags/v')
8-
# runs-on: ubuntu-latest
9-
# steps:
10-
# - uses: actions/checkout@v2
11-
# - uses: actions/setup-python@v2
12-
# with:
13-
# python-version: 3.8
14-
# - uses: abatilo/actions-poetry@v2.0.0
15-
# - run: poetry publish --build
16-
# env:
17-
# POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_API_TOKEN }}
4+
on:
5+
release:
6+
types: [published]
7+
8+
permissions:
9+
contents: read
10+
11+
jobs:
12+
deploy:
13+
14+
runs-on: ubuntu-latest
15+
16+
steps:
17+
- uses: actions/checkout@v3
18+
- name: Set up Python
19+
uses: actions/setup-python@v3
20+
with:
21+
python-version: '3.8'
22+
- name: Install dependencies
23+
run: |
24+
python -m pip install --upgrade pip
25+
pip install poetry
26+
poetry export -f requirements.txt --output requirements.txt --without-hashes
27+
pip install build
28+
- name: Build package
29+
run: python -m build
30+
- name: Publish package
31+
uses: pypa/gh-action-pypi-publish@27b31702a0e7fc50959f5ad993c78deac1bdfc29
32+
with:
33+
user: __token__
34+
password: ${{ secrets.PYPI_API_TOKEN }}

README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,3 +86,19 @@ service.resources.add(table)
8686

8787
service.render()
8888
```
89+
90+
# New version release process
91+
92+
- Update the version in pyproject.toml
93+
94+
```
95+
# increase the version number as per SemVer standards
96+
version = "2.13.17"
97+
```
98+
99+
- Once ready to publish, create a new [github release](https://github.com/epsylabs/serverless-builder/releases)
100+
- its a good practice to match the tag with the version number as in pyproject.toml
101+
- Select `set as latest release` checkbox
102+
- Click `Publish Release` button.
103+
104+
- Once published, it will trigger the `release` gh wf and publish the latest package to PyPi.

0 commit comments

Comments
 (0)