mirror of
https://github.com/ManimCommunity/manim.git
synced 2026-06-22 10:01:47 +00:00
Bumps [actions/checkout](https://github.com/actions/checkout) from 4 to 5. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v4...v5) --- updated-dependencies: - dependency-name: actions/checkout dependency-version: '5' 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>
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@v5
|
|
|
|
- name: Set up Python 3.13
|
|
uses: actions/setup-python@v6
|
|
with:
|
|
python-version: 3.13
|
|
|
|
- name: Install uv
|
|
uses: astral-sh/setup-uv@v6
|
|
|
|
- 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
|