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