Skip to content
Merged
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
16 changes: 6 additions & 10 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,7 @@
on:
pull_request:
push:
release:
types:
- published



concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
Expand Down Expand Up @@ -69,13 +66,13 @@ jobs:
path: ${{ steps.build-package.outputs.PACKAGE_PATH }}

publish_conda:
needs: [conda]
needs: [conda, pypi]
name: Publish to Anaconda
environment: anaconda
permissions:
id-token: write
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/v')

steps:
- uses: actions/download-artifact@v3
Expand All @@ -87,7 +84,6 @@ jobs:
run: find ${{ steps.build-package.outputs.PACKAGE_PATH }} -type f -name "*.tar.bz2"

- name: Upload to Anaconda
if: github.event_name == 'release' && github.event.action == 'published'
run: |
export ANACONDA_API_TOKEN=${{ secrets.ANACONDA_TOKEN }}
find ${{ steps.build-package.outputs.PACKAGE_PATH }} -type f -name "*.tar.bz2" -exec echo "anaconda upload {}" \;
Expand All @@ -105,18 +101,18 @@ jobs:

publish_pypi:
name: Publish to PyPI
needs: [dist]
needs: [dist, pypi, conda]
environment:
name: pypi
url: https://pypi.org/p/brainiak
permissions:
id-token: write
runs-on: ubuntu-latest
if: github.event_name == 'release' && github.event.action == 'published'
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/v')
steps:
- uses: actions/download-artifact@v3
with:
name: Packages
path: dist

- uses: pypa/gh-action-pypi-publish@release/v1
- uses: pypa/gh-action-pypi-publish@release/v1