Skip to content

feat: remove text fields (#1879) #547

feat: remove text fields (#1879)

feat: remove text fields (#1879) #547

name: Publish Python Package
on:
push:
branches:
- master
paths-ignore:
- "CHANGELOG.md"
- "game/__init__.py"
workflow_dispatch:
jobs:
publish-pypi-packages:
name: Publish PyPi Packages
runs-on: ubuntu-22.04
permissions:
id-token: write
env:
CONFIG: pyproject.toml
steps:
- name: 🤖 Set up CFL bot
uses: ocadotechnology/codeforlife-workspace/.github/actions/bot/setup@main
id: setup-bot
with:
cfl-app-private-key: ${{ secrets.CFL_APP_PRIVATE_KEY }}
- name: 🛫 Checkout
uses: actions/checkout@v5
with:
token: ${{ steps.setup-bot.outputs.token }}
fetch-depth: 0
ref: ${{ github.sha }}
persist-credentials: false
- name: 🛫 Checkout Branch on Workflow SHA
run: git checkout -B ${{ github.ref_name }} ${{ github.sha }}
- name: 🐍 Set up Python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: Install pip requirements
run: |
pip install pipenv build python-semantic-release==9.*
pipenv install --dev --system
pip install -U git+https://github.com/ocadotechnology/codeforlife-portal.git#egg=codeforlife-portal #TODO: Remove as part of #688
sudo apt-get install gettext
- name: 📜 Detect Semantic Version
env:
GH_TOKEN: ${{ steps.setup-bot.outputs.token }}
GIT_COMMIT_AUTHOR: ${{ steps.setup-bot.outputs.git-committer }}
run: semantic-release --config=${{ env.CONFIG }} version
- name: Build package
run: python -m build --sdist --wheel
- name: 🚀 Publish Semantic Release
env:
GH_TOKEN: ${{ steps.setup-bot.outputs.token }}
GIT_COMMIT_AUTHOR: ${{ steps.setup-bot.outputs.git-committer }}
run: semantic-release --config=${{ env.CONFIG }} publish
- name: 🚀 Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
skip-existing: true
monitor:
uses: ocadotechnology/codeforlife-workspace/.github/workflows/monitor-python-release.yaml@main
secrets: inherit
needs: [publish-pypi-packages]
with:
python-version: 3.12
remove-repo-name-prefix: ""