-
Notifications
You must be signed in to change notification settings - Fork 8
46 lines (40 loc) · 1.2 KB
/
CD.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
on:
push:
branches:
- main
name: ShipEngine Python CD
jobs:
release-please:
runs-on: ubuntu-latest
steps:
- uses: GoogleCloudPlatform/release-please-action@v2
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: python
package-name: shipengine
# Checkout code if release was created
- uses: actions/checkout@v2
if: ${{ steps.release.outputs.release_created }}
# Setup Python if release was created
- name: Install Python
uses: actions/setup-python@v2
with:
python-version: 3.7
if: ${{ steps.release.outputs.release_created }}
- name: Install dependancies
run: |
python -m pip install --upgrade pip
python -m pip install poetry
poetry install
if: ${{ steps.release.outputs.release_created }}
- name: Build the code
run: |
poetry build
if: ${{ steps.release.outputs.release_created }}
- name: Publish package
run: |
poetry publish
env:
POETRY_PYPI_TOKEN_PYPI: ${{ secrets.PYPI_TOKEN }}
if: ${{ steps.release.outputs.release_created }}