Skip to content
Myr

publish.yml

This file

Path

.github/workflows/publish.yml

95 lines · 2.4 KiB · YAML

Last changed by

Bump the actions group with 2 updates (#7596)dependabot[bot]before adoption414f051

History of this file

Take it

Add Trusted Publishing Release WorkflowIan Stapleton Cordascobefore adoptione57b5bf

lines 1–6why, one step back
1name: Publish to PyPI
23on:4 push:5 tags:6 - "v*"

Update publish workflow and add test pypi optionNate Prewittbefore adoption00600b3

lines 7–12why, one step back
7 workflow_dispatch:
8 inputs:9 test-pypi-only:10 description: "Publish to Test PyPI only"11 type: boolean12 default: true

Add Trusted Publishing Release WorkflowIan Stapleton Cordascobefore adoptione57b5bf

lines 13–21why, one step back
13
14permissions:15 contents: read1617jobs:18 build:19 name: "Build dists"20 runs-on: "ubuntu-latest"21 outputs:

Update publish workflow to use `artifact-id` instead of `name`Grant Birkinbinebefore adoption46e939b

line 22why, one step back
22 artifact-id: ${{ steps.upload-artifact.outputs.artifact-id }}

Add Trusted Publishing Release WorkflowIan Stapleton Cordascobefore adoptione57b5bf

lines 23–25why, one step back
23
24 steps:25 - name: "Checkout repository"

Bump actions/checkout from 6.0.2 to 7.0.0 in the actions group (#7540)dependabot[bot]before adoption4ed3d1b

line 26why, one step back
26 uses: "actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0" # v7.0.0

Update publish workflow to use `artifact-id` instead of `name`Grant Birkinbinebefore adoption46e939b

lines 27–28why, one step back
27 with:
28 persist-credentials: false

Add Trusted Publishing Release WorkflowIan Stapleton Cordascobefore adoptione57b5bf

lines 29–30why, one step back
29
30 - name: "Setup Python"

Bump the actions group with 2 updates (#7596)dependabot[bot]before adoption414f051

line 31why, one step back
31 uses: "actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97" # v7.0.0

Add Trusted Publishing Release WorkflowIan Stapleton Cordascobefore adoptione57b5bf

lines 32–35why, one step back
32 with:
33 python-version: "3.x"3435 - name: "Install dependencies"

Update publish workflow and add test pypi optionNate Prewittbefore adoption00600b3

line 36why, one step back
36 run: python -m pip install build==1.4.0

Add Trusted Publishing Release WorkflowIan Stapleton Cordascobefore adoptione57b5bf

lines 37–43why, one step back
37
38 - name: "Build dists"39 run: |40 SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) \41 python -m build4243 - name: "Upload dists"

Bump actions/upload-artifact from 6.0.0 to 7.0.0dependabot[bot]before adoption27f8b40

line 44why, one step back
44 uses: "actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f"

Update publish workflow to use `artifact-id` instead of `name`Grant Birkinbinebefore adoption46e939b

line 45why, one step back
45 id: upload-artifact

Add Trusted Publishing Release WorkflowIan Stapleton Cordascobefore adoptione57b5bf

lines 46–54why, one step back
46 with:
47 name: "dist"48 path: "dist/"49 if-no-files-found: error50 retention-days: 55152 publish:53 name: "Publish"54 if: startsWith(github.ref, 'refs/tags/')

Update publish workflow and add test pypi optionNate Prewittbefore adoption00600b3

line 55why, one step back
55 needs: ["build"]

Add Trusted Publishing Release WorkflowIan Stapleton Cordascobefore adoptione57b5bf

lines 56–58why, one step back
56 permissions:
57 id-token: write58 runs-on: "ubuntu-latest"

Update publish workflow and add test pypi optionNate Prewittbefore adoption00600b3

lines 59–60why, one step back
59 environment:
60 name: "publish"

Add Trusted Publishing Release WorkflowIan Stapleton Cordascobefore adoptione57b5bf

lines 61–63why, one step back
61
62 steps:63 - name: "Download dists"

Bump actions/download-artifact from 7.0.0 to 8.0.0dependabot[bot]before adoption392b01f

line 64why, one step back
64 uses: "actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3" # v8.0.0

Add Trusted Publishing Release WorkflowIan Stapleton Cordascobefore adoptione57b5bf

line 65why, one step back
65 with:

Update publish workflow to use `artifact-id` instead of `name`Grant Birkinbinebefore adoption46e939b

line 66why, one step back
66 artifact-ids: ${{ needs.build.outputs.artifact-id }}

Add Trusted Publishing Release WorkflowIan Stapleton Cordascobefore adoptione57b5bf

lines 67–69why, one step back
67 path: "dist/"
6869 - name: "Publish dists to PyPI"

Bump pypa/gh-action-pypi-publish from 1.13.0 to 1.14.0 (#7378)dependabot[bot]before adoption79f4df8

line 70why, one step back
70 uses: "pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b" # v1.14.0

Update publish workflow and add test pypi optionNate Prewittbefore adoption00600b3

lines 71–85why, one step back
71 with:
72 attestations: true7374 publish-test-pypi:75 name: "Publish to Test PyPI"76 if: github.event_name == 'workflow_dispatch'77 needs: ["build"]78 permissions:79 id-token: write80 runs-on: "ubuntu-latest"81 environment:82 name: "testpypi"8384 steps:85 - name: "Download dists"

Bump actions/download-artifact from 7.0.0 to 8.0.0dependabot[bot]before adoption392b01f

line 86why, one step back
86 uses: "actions/download-artifact@70fc10c6e5e1ce46ad2ea6f2b72d43f7d47b13c3" # v8.0.0

Update publish workflow and add test pypi optionNate Prewittbefore adoption00600b3

lines 87–91why, one step back
87 with:
88 artifact-ids: ${{ needs.build.outputs.artifact-id }}89 path: "dist/"9091 - name: "Publish dists to Test PyPI"

Bump pypa/gh-action-pypi-publish from 1.13.0 to 1.14.0 (#7378)dependabot[bot]before adoption79f4df8

line 92why, one step back
92 uses: "pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b" # v1.14.0

Update publish workflow and add test pypi optionNate Prewittbefore adoption00600b3

lines 93–95why, one step back
93 with:
94 repository-url: https://test.pypi.org/legacy/95 attestations: true