mirror of
https://github.com/jeertmans/manim-slides.git
synced 2025-08-06 14:19:52 +08:00
![dependabot[bot]](/assets/img/avatar_default.png)
Bumps [astral-sh/setup-uv](https://github.com/astral-sh/setup-uv) from 3 to 4. - [Release notes](https://github.com/astral-sh/setup-uv/releases) - [Commits](https://github.com/astral-sh/setup-uv/compare/v3...v4) --- updated-dependencies: - dependency-name: astral-sh/setup-uv dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jérome Eertmans <jeertmans@icloud.com>
73 lines
1.8 KiB
YAML
73 lines
1.8 KiB
YAML
name: Upload Packages
|
|
|
|
on:
|
|
push:
|
|
|
|
release:
|
|
types: [published]
|
|
|
|
jobs:
|
|
publish-python:
|
|
name: Publish Python package
|
|
runs-on: ubuntu-latest
|
|
environment: release
|
|
permissions:
|
|
# IMPORTANT: this permission is mandatory for trusted publishing
|
|
id-token: write
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup uv
|
|
uses: astral-sh/setup-uv@v4
|
|
with:
|
|
enable-cache: true
|
|
|
|
- name: Build package
|
|
run: uv build
|
|
|
|
- name: Publish to PyPI
|
|
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
|
|
uses: pypa/gh-action-pypi-publish@release/v1
|
|
|
|
publish-docker:
|
|
name: Publish Docker image
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
REGISTRY: ghcr.io
|
|
IMAGE_NAME: ${{ github.repository }}
|
|
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: Get Version
|
|
id: create_release
|
|
shell: python
|
|
env:
|
|
tag_act: ${{ github.ref }}
|
|
run: |
|
|
import os
|
|
ref_tag = os.getenv('tag_act').split('/')[-1]
|
|
with open(os.getenv('GITHUB_OUTPUT'), 'w') as f:
|
|
print(f"tag_name={ref_tag}", file=f)
|
|
|
|
- name: Build and push
|
|
uses: docker/build-push-action@v6
|
|
with:
|
|
platforms: linux/arm64,linux/amd64
|
|
file: docker/Dockerfile
|
|
push: ${{ github.event_name == 'push' && startsWith(github.ref, 'refs/tags') }}
|
|
tags: |
|
|
ghcr.io/jeertmans/manim-slides:latest
|
|
ghcr.io/jeertmans/manim-slides:${{ steps.create_release.outputs.tag_name }}
|