Skip to content

chore: promote CHANGELOG for v0.7.1282 #2766

chore: promote CHANGELOG for v0.7.1282

chore: promote CHANGELOG for v0.7.1282 #2766

Workflow file for this run

name: Publish to PyPI, TestPyPI, and GitHub
on:
push:
workflow_dispatch:
env:
PROJECT_NAME: metagit-cli
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
build:
name: Build distribution
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
with:
fetch-depth: 0
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: "3.13"
- name: Set up uv
uses: astral-sh/setup-uv@08807647e7069bb48b6ef5acd8ec9567f424441b # v8.1.0
- name: Install dependencies
run: |
uv sync --frozen
- name: Build package
run: |
uv build
- name: Store the distribution packages
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: python-package-distributions
path: dist/
publish-to-testpypi:
name: Publish to PyPI (TEST)
needs:
- build
runs-on: ubuntu-latest
if: startsWith(github.ref, 'refs/tags/')
environment:
name: testpypi
url: https://test.pypi.org/p/${{ env.PROJECT_NAME }}
permissions:
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: python-package-distributions
path: dist/
- name: Publish
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0
with:
repository-url: https://test.pypi.org/legacy/
publish-to-pypi:
name: Publish to PyPI (PROD)
runs-on: ubuntu-latest
# only publish to PyPI on tag pushes
if: startsWith(github.ref, 'refs/tags/')
needs:
- build
- publish-to-testpypi
permissions:
id-token: write
environment:
name: production
url: https://pypi.org/p/${{ env.PROJECT_NAME }}
steps:
- name: Download all the dists
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: python-package-distributions
path: dist/
- name: Publish
uses: pypa/gh-action-pypi-publish@cef221092ed1bacb1cc03d23a2d87d1d172e277b # v1.14.0