Skip to content

Commit

Permalink
Merge pull request #1110 from bids-standard/test-pypi-uploads
Browse files Browse the repository at this point in the history
chore(ci): Upload attested package to (test) PyPI
  • Loading branch information
effigies authored Dec 5, 2024
2 parents 36468b3 + d06176a commit 3150bdf
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 52 deletions.
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
name: Python tests

# This file tests the claimed support range of PyBIDS including
#
# * Operating systems: Linux, OSX
Expand All @@ -9,6 +7,9 @@ on:
branches:
- master
- maint/*
- test-pypi-uploads
tags:
- '*'
pull_request: {}
schedule:
# 8am EST / 9am EDT Mondays
Expand Down Expand Up @@ -112,3 +113,44 @@ jobs:
with:
files: cov.xml
token: ${{ secrets.CODECOV_TOKEN }}

test-publish:
name: Push package to test.pypi.org
if: github.event_name == 'push'
runs-on: ubuntu-latest
needs: [build]
permissions:
attestations: write
id-token: write

steps:
- name: Download packages built by build-and-inspect-python-package
uses: actions/download-artifact@v4
with:
name: Packages
path: dist

- name: Upload package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
repository-url: https://test.pypi.org/legacy/
skip-existing: true

publish:
name: Publish released package to pypi.org
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
runs-on: ubuntu-latest
needs: [test, test-publish]
permissions:
attestations: write
id-token: write

steps:
- name: Download packages built by build-and-inspect-python-package
uses: actions/download-artifact@v4
with:
name: Packages
path: dist

- name: Upload package to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
50 changes: 0 additions & 50 deletions .github/workflows/package.yml

This file was deleted.

0 comments on commit 3150bdf

Please sign in to comment.