Skip to content

Commit

Permalink
Use trusted publishing for releases (LorenFrankLab#678)
Browse files Browse the repository at this point in the history
* Use trusted publishing instead of secrets

* Add isort on save, remove deprecated setting
  • Loading branch information
edeno authored Nov 7, 2023
1 parent 2f64ca7 commit 1e66ad4
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 6 deletions.
12 changes: 8 additions & 4 deletions .github/workflows/test-package-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -80,15 +80,19 @@ jobs:
# - name: Run tests
# run: pytest --doctest-modules -v --pyargs spyglass
publish:
name: Upload release to PyPI
runs-on: ubuntu-latest
needs: [test-package]
environment:
name: pypi
url: https://pypi.org/p/spyglass-neuro
permissions:
id-token: write # IMPORTANT: this permission is mandatory for trusted publishing
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
steps:
- uses: actions/download-artifact@v3
with:
name: dist
path: dist/
- uses: pypa/gh-action-pypi-publish@release/v1
with:
user: __token__
password: ${{ secrets.PYPI_API_TOKEN }}
- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
11 changes: 9 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,18 @@
"files.trimFinalNewlines": true,
"editor.multiCursorModifier": "ctrlCmd",
"autoDocstring.docstringFormat": "numpy",
"python.formatting.provider": "none",
"remote.SSH.remoteServerListenOnSocket": true,
"git.confirmSync": false,
"python.analysis.typeCheckingMode": "off",
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true,
"editor.codeActionsOnSave": {
"source.organizeImports": true
},
},
"isort.args": [
"--profile",
"black"
],
}

0 comments on commit 1e66ad4

Please sign in to comment.