v1.7.0 #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Publish | |
on: | |
workflow_dispatch: | |
release: | |
types: [published] | |
env: | |
PIP_DISABLE_PIP_VERSION_CHECK: '1' | |
FORCE_COLOR: '3' | |
jobs: | |
build: | |
name: Build sdist and wheel | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
name: Checkout repository | |
- uses: actions/[email protected] | |
with: | |
python-version: "3.12" | |
- name: Install build tools | |
run: | | |
pipx run build --outdir dist | |
- name: Upload wheel and sdist artifacts | |
uses: actions/[email protected] | |
with: | |
name: artifacts | |
path: ./dist/* | |
if-no-files-found: error | |
publish: | |
needs: [build] | |
name: Upload to PyPI | |
runs-on: ubuntu-latest | |
environment: | |
name: release | |
url: https://pypi.org/p/autograd | |
permissions: | |
id-token: write # mandatory for trusted publishing | |
steps: | |
- name: Download artifacts | |
uses: actions/[email protected] | |
with: | |
path: dist | |
merge-multiple: true | |
- name: Sanity check artifacts | |
run: ls -la dist/ | |
- name: Publish sdist and wheel to PyPI | |
uses: pypa/gh-action-pypi-publish@ec4db0b4ddc65acdf4bff5fa45ac92d78b56bdf0 | |
with: | |
repository-url: https://pypi.org/p/autograd/ | |
packages-dir: dist/ |