Skip to content

chore: use reusable CI #414

chore: use reusable CI

chore: use reusable CI #414

Workflow file for this run

name: CI/CD
on:
push:
branches:
- main
pull_request:
workflow_dispatch:
permissions:
contents: write
pull-requests: write
id-token: write
jobs:
ci:
uses: supabase/actions/.github/workflows/python-ci.yml@main
with:
enable-publish: true
package-name: 'supabase_functions'
secrets:
COVERALLS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
publish_legacy:
needs: ci
if: ${{ startsWith(github.event.head_commit.message, 'chore(main)') && github.ref == 'refs/heads/main' && github.event_name == 'push' && github.repository_owner == 'supabase' }}
runs-on: ubuntu-latest
name: "supafunc: Publish to PyPi"
environment:
name: pypi
url: https://pypi.org/p/supafunc
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
contents: write # needed for github actions bot to write to repo
steps:
- name: Set up Python 3.11
uses: actions/setup-python@v5
with:
python-version: 3.11
- name: Clone Repository
uses: actions/checkout@v4
with:
ref: ${{ github.ref }}
fetch-depth: 0
- name: Rename Project
id: rename_project
run: make rename_project
- name: Set up Poetry
run: pipx install poetry==1.8.5 --python python3.11
- name: Install the project dependencies
run: poetry install
- name: Build package dist directory
run: poetry build
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1