Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch to softprops/action-gh-release to upload artifacts for GitHub Releases #268

Merged
merged 3 commits into from
Apr 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 10 additions & 19 deletions .github/workflows/release_action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,8 @@ jobs:
uses: actions/setup-python@v4
with:
python-version: "3.12"
- name: Install pypa/build
run: >-
python3 -m
pip install
build
--user
- name: Build a binary wheel and a source tarball
run: python -m build
- name: Build a source tarball and a wheel from it
run: pipx run build
- name: Store the distribution packages
uses: actions/upload-artifact@v3
with:
Expand Down Expand Up @@ -77,20 +71,17 @@ jobs:
inputs: >-
./dist/*.tar.gz
./dist/*.whl
- name: Upload artifact signatures to GitHub Release
env:
GITHUB_TOKEN: ${{ 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 }}'
- name: Publish artifacts and signatures to GitHub Releases
uses: softprops/action-gh-release@9d7c94cfd0a1f3ed45544c887983e9fa900f0564 # v2.0.4
with:
# `dist/` contains the built packages, and the
# sigstore-produced signatures and certificates.
files: dist/*

publish-to-testpypi:
name: Publish Python 🐍 distribution 📦 to TestPyPI
if: contains(github.ref, 'rc') && github.repository == github.event.repository # only publish to TestPyPI for rc tags
# only publish to TestPyPI for rc tags
if: contains(github.ref, 'rc') && github.repository == 'pybop-team/PyBOP'
needs:
- build
runs-on: ubuntu-latest
Expand Down
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@

## Features

- [#268](https://github.com/pybop-team/PyBOP/pull/268) - Fixes the GitHub Release artifact uploads, allowing verification of
codesigned binaries and source distributions via `sigstore-python`.
- [#79](https://github.com/pybop-team/PyBOP/issues/79) - Adds BPX as a dependency and imports BPX support from PyBaMM.
- [#267](https://github.com/pybop-team/PyBOP/pull/267) - Add classifiers to pyproject.toml, update project.urls.
- [#195](https://github.com/pybop-team/PyBOP/issues/195) - Adds the Nelder-Mead optimiser from PINTS as another option.
Expand Down
Loading