Skip to content

Commit

Permalink
github
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiud committed Nov 6, 2024
1 parent 007ed17 commit a272719
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 2 deletions.
65 changes: 65 additions & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: PyPI

on:
push:
#tags:
# - v*

jobs:
#publish-to-pypi:
# name: Publish to PyPI
# #if: startsWith(github.ref, 'refs/tags/') # only publish to PyPI on tag pushes
# if: false
# runs-on: ubuntu-latest
# needs:
# - build-wheels
# environment:
# name: pypi
# url: https://pypi.org/p/hogpp # Replace <package-name> with your PyPI project name
# permissions:
# id-token: write # IMPORTANT: mandatory for trusted publishing

# steps:
# - name: Download artifacts
# uses: actions/download-artifact@v4
# with:
# name: python-package-distributions
# path: |
# dist/
# wheelhouse/

# - name: Publish to PyPI
# uses: pypa/gh-action-pypi-publish@release/v1

sign:
name: Sign packages
needs:
#- publish-to-pypi
- build-sdist
runs-on: ubuntu-latest
permissions:
id-token: write # IMPORTANT: mandatory for sigstore

steps:
- name: Download artifacts
uses: actions/download-artifact@v4
with:
name: python-package-distributions
path: |
dist/
wheelhouse/
- name: Sign packages with Sigstore
uses: sigstore/gh-action-sigstore-python@v3.0.0
with:
inputs: >-
dist/*.tar.gz
wheelhouse/*.whl
#- name: Upload artifact signatures
# env:
# GITHUB_TOKEN: ${{ github.token }}
# run: >-
# gh release upload '${{ github.ref_name }}'
# dist/** wheelhouse/**
# --repo '${{ github.repository }}'
43 changes: 41 additions & 2 deletions .github/workflows/wheels.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,21 @@
name: Wheels

on: [push, pull_request]
on:
push:
#paths-ignore:
# - '.clang-format'
# - '.dockerignore'
# - '.gitignore'
# - 'docs/**'
# - 'scripts/**'
# - 'tests/cpp/**'
# - 'workflow/**'
#tags:
# - v*

jobs:
build_wheels:
build-wheels:
if: false
name: Build wheels on ${{matrix.os}}
runs-on: ${{matrix.os}}
strategy:
Expand Down Expand Up @@ -43,3 +55,30 @@ jobs:
with:
name: cibw-wheels-${{matrix.os}}-${{strategy.job-index}}
path: ./wheelhouse/*.whl

build-sdist:
name: Build sdist
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: 3.13
cache: 'pip'
cache-dependency-path: requirements.txt

- name: Setup Dependencies
run: |
pip install -r requirements.txt
- name: Build
run: |
pipx run build --sdist --verbose
- uses: actions/upload-artifact@v4
with:
name: sdist-${{strategy.job-index}}
path: ./dist/*.tar.gz

0 comments on commit a272719

Please sign in to comment.