Skip to content

Commit

Permalink
add standard autodeployment (#57) (#63)
Browse files Browse the repository at this point in the history
* add standard autodeployment (#57)
* use OpenID Connect (OIDC) for deploy.yml
  - trusted PyPi published configured
  - removed TOKEN-based authentication
    (note: repo had never any secrets defined)
* trusted publisher workflow
  - update deploy.yaml with @IAlibay's updates in GridDataFormats
  - added 'deploy' environment in MDAnalysisData settings
  - updated Trusted Publisher for PyPi project
  - added pending Trusted Publisher (https://docs.pypi.org/trusted-publishers/) for Test PyPi
    project
  • Loading branch information
orbeckst authored Oct 30, 2023
1 parent 657d2b6 commit c550a46
Show file tree
Hide file tree
Showing 2 changed files with 58 additions and 0 deletions.
55 changes: 55 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
name: Build and upload to PyPi

on:
push:
tags:
- "*"
release:
types:
- published

jobs:
testpypi_push:
environment:
name: deploy
url: https://test.pypi.org/p/MDAnalysisData
permissions:
id-token: write
if: |
github.repository == 'MDAnalysis/MDAnalysisData' &&
(github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
name: Build, upload and test pure Python wheels to TestPypi
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: testpypi_deploy
uses: MDAnalysis/pypi-deployment@main
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/')
with:
test_submission: true
package_name: MDAnalysisData
module_name: 'MDAnalysisData'

pypi_push:
environment:
name: deploy
url: https://pypi.org/p/MDAnalysisData
permissions:
id-token: write
if: |
github.repository == 'MDAnalysis/MDAnalysisData' &&
(github.event_name == 'release' && github.event.action == 'published')
name: Build, upload and test pure Python wheels to PyPi
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: pypi_deploy
uses: MDAnalysis/pypi-deployment@main
if: github.event_name == 'release' && github.event.action == 'published'
with:
package_name: MDAnalysisData
module_name: 'MDAnalysisData'
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,9 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
### Changes
- Update package to only support NEP29 range (Python 3.9 - 3.12 as of writing)

### Changes (internal)
- automated deployment (#57)

## [0.8.1] - 2021-10-04

### Added
Expand Down

0 comments on commit c550a46

Please sign in to comment.