Skip to content

fix: Unshare custom levels when releasing students (#2376) #761

fix: Unshare custom levels when releasing students (#2376)

fix: Unshare custom levels when releasing students (#2376) #761

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',
});