Skip to content

Commit

Permalink
fix(ci): again
Browse files Browse the repository at this point in the history
  • Loading branch information
jeertmans committed Dec 13, 2024
1 parent b47e97f commit c55187c
Showing 1 changed file with 24 additions and 12 deletions.
36 changes: 24 additions & 12 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@ jobs:
path: differt-core/dist

release-differt-core:
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || github.event.inputs.publish-differt-core
name: Release differt-core
runs-on: ubuntu-latest
needs: [linux, musllinux, windows, macos, sdist]
Expand All @@ -212,21 +213,16 @@ jobs:
subject-path: dist/differt-core-wheels-*

- name: Publish to PyPI
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || github.event.inputs.publish-differt
uses: PyO3/maturin-action@v1
with:
command: upload
args: --non-interactive --skip-existing dist/differt-core-wheels-*
args: --non-interactive --skip-existing dist/differt-core-wheels-*/*
working-directory: differt-core

build-and-release-differt:
name: Build and release differt
build-differt:
name: Build DiffeRT
runs-on: ubuntu-latest
environment: release
permissions:
id-token: write
contents: write
attestations: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
Expand All @@ -236,9 +232,6 @@ jobs:
with:
enable-cache: true

- name: Install dependencies
run: uv sync

- name: Build package
run: uv build --package differt -o dist

Expand All @@ -248,11 +241,30 @@ jobs:
name: differt-wheels-and-sdist
path: dist

release-differt:
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || github.event.inputs.publish-differt
name: Release DiffeRT
runs-on: ubuntu-latest
needs: [build-differt]
environment: release
permissions:
id-token: write
contents: write
attestations: write
steps:
- name: Checkout repository
uses: actions/checkout@v4

- name: Download build wheels
uses: actions/download-artifact@v4
with:
path: dist
pattern: differt-wheels-and-sdist

- name: Generate artifact attestation
uses: actions/attest-build-provenance@v1
with:
subject-path: dist/*

- name: Publish to PyPI
if: (github.event_name == 'push' && startsWith(github.ref, 'refs/tags/v')) || github.event.inputs.publish-differt
uses: pypa/gh-action-pypi-publish@release/v1

0 comments on commit c55187c

Please sign in to comment.