Skip to content

SimuHW 0.4.1

SimuHW 0.4.1 #7

Workflow file for this run

name: Release of packages
on:
release:
types:
- published
jobs:
dist:
name: Build distribution
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
with:
submodules: recursive
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install setuptools wheel build
- name: Build wheel and source tarball
run: |
python -m build
- name: Store built wheel
uses: actions/upload-artifact@v6
with:
name: python-package-distributions
path: |
dist/simuhw-*.whl
dist/simuhw-*.tar.gz
retention-days: 1
pypi:
name: Publish distribution
needs:
- dist
runs-on: ubuntu-latest
environment:
name: pypi
url: https://pypi.org/p/simuhw
permissions:
id-token: write # IMPORTANT: mandatory for trusted publishing
steps:
- name: Download distribution
uses: actions/download-artifact@v7
with:
name: python-package-distributions
path: dist/
merge-multiple: true
- name: Publish distribution to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
verbose: true
github-release:
needs:
- dist
runs-on: ubuntu-latest
permissions:
contents: write # IMPORTANT: mandatory for making GitHub Releases
id-token: write # IMPORTANT: mandatory for sigstore
steps:
- name: Download distribution
uses: actions/download-artifact@v7
with:
name: python-package-distributions
path: dist/
merge-multiple: true
- name: Sign distribution with Sigstore
uses: sigstore/[email protected]
with:
inputs: |
./dist/simuhw-*.whl
./dist/simuhw-*.tar.gz
- name: Upload artifact signatures to GitHub Release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Upload to GitHub Release using the `gh` CLI.
# `dist/` contains the built packages, and the
# sigstore-produced signatures and certificates.
run: |
gh release upload '${{ github.ref_name }}' dist/** --repo '${{ github.repository }}' --clobber