mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
* rewrite pyproject.toml to support uv; version upgrades of several dev dependencies * codespellrc: poetry.lock -> uv.lock * rewrite workflows, first attempt * change name of pre-commit-hook * dev-dependencies -> dependency-groups.dev * lint + format * Update .github/workflows/ci.yml Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com> * convert development.rst to myst markdown * fix (most) docbuild warnings from theme upgrade * development instructions: switch to uv, plus minor updates * update entrypoint config in plugin docs + tests * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: Aarush Deshpande <110117391+JasonGrace2282@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
70 lines
2 KiB
YAML
70 lines
2 KiB
YAML
name: Publish Release
|
|
|
|
on:
|
|
release:
|
|
types: [released]
|
|
|
|
jobs:
|
|
release:
|
|
name: "Publish release"
|
|
runs-on: ubuntu-latest
|
|
environment: release
|
|
permissions:
|
|
id-token: write
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: Set up Python 3.13
|
|
uses: actions/setup-python@v5
|
|
with:
|
|
python-version: 3.13
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v5
|
|
|
|
- name: Build and push release to PyPI
|
|
run: |
|
|
uv sync
|
|
uv build
|
|
uv publish
|
|
|
|
- name: Store artifacts
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
path: dist/*.tar.gz
|
|
name: manim.tar.gz
|
|
- name: Install Dependency
|
|
run: pip install requests
|
|
- name: Get Upload URL
|
|
id: create_release
|
|
shell: python
|
|
env:
|
|
access_token: ${{ secrets.GITHUB_TOKEN }}
|
|
tag_act: ${{ github.ref }}
|
|
run: |
|
|
import requests
|
|
import os
|
|
ref_tag = os.getenv('tag_act').split('/')[-1]
|
|
access_token = os.getenv('access_token')
|
|
headers = {
|
|
"Accept":"application/vnd.github.v3+json",
|
|
"Authorization": f"token {access_token}"
|
|
}
|
|
url = f"https://api.github.com/repos/ManimCommunity/manim/releases/tags/{ref_tag}"
|
|
c = requests.get(url,headers=headers)
|
|
upload_url=c.json()['upload_url']
|
|
with open(os.getenv('GITHUB_OUTPUT'), 'w') as f:
|
|
print(f"upload_url={upload_url}", file=f)
|
|
print(f"tag_name={ref_tag[1:]}", file=f)
|
|
|
|
- name: Upload Release Asset
|
|
id: upload-release
|
|
uses: actions/upload-release-asset@v1
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
upload_url: ${{ steps.create_release.outputs.upload_url }}
|
|
asset_path: dist/manim-${{ steps.create_release.outputs.tag_name }}.tar.gz
|
|
asset_name: manim-${{ steps.create_release.outputs.tag_name }}.tar.gz
|
|
asset_content_type: application/gzip
|