mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-08-06 14:19:52 +08:00

* chore(deps): use PDM instead of Poetry * chore(git): move to top * chore(lint): fixes * fix(pdm): dynamic version did not work * chore(ci): fix syntax for Windows * fix(ci): typo * wip(docs): updates * chore(docs): add changelog entry * chore(docs): admonitions * chore(docs): update to use manim-slides render * chore(docs): make it better
63 lines
1.5 KiB
YAML
63 lines
1.5 KiB
YAML
name: Upload Packages
|
|
|
|
on:
|
|
push:
|
|
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
publish-python:
|
|
name: Build and release
|
|
runs-on: ubuntu-latest
|
|
environment: release
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install PDM
|
|
uses: pdm-project/setup-pdm@v3
|
|
with:
|
|
python-version: '3.10'
|
|
cache: true
|
|
|
|
- name: Publish to PyPI
|
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
|
run: pdm publish
|
|
|
|
publish-docker:
|
|
name: Publish Docker image
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
IMAGE_NAME: ${{ github.repository }}`
|
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Set up Docker Buildx
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
- name: Login to Docker Hub
|
|
uses: docker/login-action@v3
|
|
with:
|
|
registry: ${{ env.REGISTRY }}
|
|
username: ${{ github.actor }}
|
|
password: ${{ secrets.GITHUB_TOKEN }}
|
|
|
|
- name: Extract metadata (tags, labels) for Docker
|
|
id: meta
|
|
uses: docker/metadata-action@v5
|
|
with:
|
|
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v5
|
|
with:
|
|
context: .
|
|
file: docker/Dockerfile
|
|
push: true
|
|
tags: ${{ steps.meta.outputs.tags }}
|
|
labels: ${{ steps.meta.outputs.labels }}
|