Skip to content

Bump version to 0.11 #4

Bump version to 0.11

Bump version to 0.11 #4

Workflow file for this run

name: Publish to TestPyPI and PyPI
on:
push:
tags:
- 'v0.[0-9]+.dev[0-9]+'
- 'v0.[0-9]+'
permissions: {}
jobs:
build:
name: Build package distributions
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- uses: actions/checkout@v5
with:
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.x'
- name: Install pypa/build
run: python3 -m pip install build --user
- name: Build a binary wheel and a source tarball
run: python3 -m build
- name: Store the package distributions
uses: actions/upload-artifact@v4
with:
name: python-package-distributions
path: dist/
publish-to-testpypi:
name: Publish to TestPyPI
runs-on: ubuntu-latest
needs:
- build
environment:
name: testpypi
url: https://test.pypi.org/p/kaitaistruct
permissions:
# IMPORTANT: mandatory for trusted publishing - see
# https://packaging.python.org/en/latest/guides/publishing-package-distribution-releases-using-github-actions-ci-cd-workflows/
id-token: write
steps:
- name: Download all the dists
uses: actions/download-artifact@v5
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
publish-to-pypi:
name: Publish to PyPI
if: |
!contains(github.ref, '.dev')
runs-on: ubuntu-latest
needs:
- publish-to-testpypi
environment:
name: pypi
url: https://pypi.org/p/kaitaistruct
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v5
with:
name: python-package-distributions
path: dist/
- name: Publish distribution to TestPyPI
uses: pypa/gh-action-pypi-publish@release/v1