Skip to content

Commit 408d882

Browse files
committed
feat: add github workflow config
1 parent a3f6cec commit 408d882

File tree

1 file changed

+48
-0
lines changed

1 file changed

+48
-0
lines changed

.github/workflows/release.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# This code was auto generated by AfterShip SDK Generator.
2+
# Do not edit the class manually.
3+
4+
name: Release to PyPI
5+
6+
on:
7+
push:
8+
tags:
9+
- '*'
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
steps:
15+
- uses: actions/checkout@v3
16+
- name: Setup Python # Set Python version
17+
uses: actions/setup-python@v3
18+
with:
19+
python-version: 3.11
20+
21+
- name: Install dependencies
22+
run: |
23+
python -m pip install --upgrade pip poetry
24+
poetry config virtualenvs.in-project --unset
25+
make install
26+
27+
- name: Build
28+
run: |
29+
make build
30+
31+
- name: Format
32+
run: |
33+
make format
34+
35+
- name: Get the version
36+
id: get_version
37+
run: echo ::set-output name=VERSION::${GITHUB_REF/refs\/tags\//}
38+
39+
- name: Upload artifact
40+
uses: actions/upload-artifact@v3
41+
with:
42+
name: ${{ steps.get_version.outputs.VERSION }}
43+
path: dist
44+
45+
- name: Release to PyPI
46+
run: |
47+
pip install twine
48+
twine upload -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} --verbose dist/*

0 commit comments

Comments
 (0)