Skip to content

Release 0.1.6 -> 0.1.7 #14

Release 0.1.6 -> 0.1.7

Release 0.1.6 -> 0.1.7 #14

Workflow file for this run

name: Publish Release
on:
push:
tags: ['*']
workflow_dispatch:
defaults:
run:
shell: bash
permissions:
contents: write
jobs:
build-wheels:
uses: ./.github/workflows/.build-matrix.yml
secrets: inherit
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.12" ]
with:
runner: ${{ matrix.os }}
python-version: ${{ matrix.python-version }}
build-sdist:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.9" ]
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/bootstrap-environ
id: bootstrap-environ
with:
python-version: ${{ matrix.python-version }}
runner: ${{ matrix.os }}
- name: Build sdist
run: poetry build -f sdist
- name: Store dist artifacts
uses: actions/upload-artifact@v4
with:
name: dist-${{ matrix.os }}-${{ matrix.python-version }}-sdist
path: dist
publish-to-pypi:
name: >-
Publish Python 🐍 distribution 📦 to PyPI
needs:
- build-wheels
- build-sdist
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/typelib
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download all the dists
uses: actions/download-artifact@v4
with:
pattern: dist-*
merge-multiple: true
path: dist
- name: Publish distribution 📦 to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
continue-on-error: true # If this fails, it's because we already published
create-release:
name: >-
Sign the Python 🐍 distribution 📦 with Sigstore
and upload them to GitHub Release
needs:
- publish-to-pypi
runs-on: ubuntu-latest
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore
steps:
- uses: actions/create-github-app-token@v1
id: app-token
with:
app-id: ${{ vars.RELEASE_BOT_APP_ID }}
private-key: ${{ secrets.RELEASE_BOT_APP_PKEY }}
- uses: actions/checkout@v4
with:
token: ${{ steps.app-token.outputs.token }}
fetch-depth: 0
- uses: ./.github/actions/bootstrap-environ
with:
python-version: 3.x
runner: ubuntu-latest
- name: Compile Release Notes
run: make release-notes > release-notes.md
- name: Report Version
run: |
export "RELEASE_VERSION=v$(make report-version)";
export "TARGET_COMMITISH=$(git rev-list -n 1 "${RELEASE_VERSION}")";
echo "RELEASE_VERSION=${RELEASE_VERSION}" >> $GITHUB_ENV
echo "TARGET_COMMITISH=${TARGET_COMMITISH}" >> $GITHUB_ENV
- name: Download all the dists
uses: actions/download-artifact@v4
with:
pattern: dist-*
merge-multiple: true
path: dist
- name: Sign the dists with Sigstore
uses: sigstore/gh-action-sigstore-python@v2.1.1
with:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Create GitHub Release
uses: softprops/action-gh-release@v2
with:
body_path: release-notes.md
tag_name: ${{ github.env.RELEASE_VERSION }}
target_commitish: ${{ github.env.TARGET_COMMITISH }}
make_latest: true
files: dist/*