-
Notifications
You must be signed in to change notification settings - Fork 81
58 lines (56 loc) · 1.66 KB
/
publish-python-package.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
49
50
51
52
53
54
55
56
57
58
name: Publish Python Package
on:
push:
branches:
- master
paths-ignore:
- "CHANGELOG.md"
- "portal/__init__.py"
jobs:
publish-pypi-packages:
name: Publish PyPi Packages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
architecture: "x64"
- name: Install pip requirements
run: |
pip install pipenv
pipenv install --dev --system
- name: Release codeforlife-portal
uses: relekang/[email protected]
with:
github_token: ${{ secrets.CFL_BOT_GITHUB_TOKEN }}
pypi_token: ${{ secrets.PYPI_TOKEN }}
- name: Build cfl-common package
run: |
pip install wheel
pushd cfl_common
python setup.py sdist bdist_wheel
popd
- name: Publish cfl-common package to PyPi
uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_TOKEN }}
packages-dir: cfl_common/dist/
skip-existing: true
- name: Trigger staging deployment
uses: actions/github-script@v6
with:
github-token: ${{ secrets.CFL_BOT_GITHUB_TOKEN }}
script: |
github.rest.actions.createWorkflowDispatch({
owner: 'ocadotechnology',
repo: 'codeforlife-deploy-appengine',
workflow_id: 'deploy_staging.yml',
ref: 'master',
});