Skip to content
This repository was archived by the owner on May 29, 2026. It is now read-only.

add deprecation (#12) #2

add deprecation (#12)

add deprecation (#12) #2

Workflow file for this run

name: Release
# This workflow runs when a tag is pushed.
# The publish-to-pypi job requires manual approval via the 'pypi' environment protection rules
# configured in Settings > Environments > pypi.
on:
push:
tags:
- '*'
jobs:
build:
name: Build distribution
runs-on: ubuntu-latest
permissions:
contents: read
actions: write
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
with:
persist-credentials: false
- name: Install uv
uses: astral-sh/setup-uv@681c641aba71e4a1c380be3ab5e12ad51f415867 # v7.1.6
with:
version: "0.9.0"
- name: Set up Python
run: uv python install
- name: Build a binary wheel
run: uv build --wheel
- name: Store the distribution packages
uses: actions/upload-artifact@b7c566a772e6b6bfb58ed0dc250532a479d7789f # v6.0.0
with:
name: python-package-distributions
path: dist/
publish-to-pypi:
name: Publish Python distribution to PyPI
if: github.repository == 'newton-physics/newton-actuators'
needs:
- build
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/newton-actuators
permissions:
id-token: write
steps:
- name: Download wheel and source tarball
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@ed0c53931b1dc9bd32cbe73a98c7f6766f8a527e # v1.13.0
create-github-release:
name: Create GitHub Release
if: github.repository == 'newton-physics/newton-actuators'
needs:
- build
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
- name: Download wheel and source tarball
uses: actions/download-artifact@37930b1c2abaa49bbe596cd826c3c89aef350131 # v7.0.0
with:
name: python-package-distributions
path: dist/
- name: Create GitHub Release
run: |
gh release create ${{ github.ref_name }} \
--draft \
--title "Release ${{ github.ref_name }}" \
dist/*
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}