-
Notifications
You must be signed in to change notification settings - Fork 18
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 deployment workflow to re-usable action. #126
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build and upload to PyPI | ||
name: Build and upload to PyPi | ||
|
||
on: | ||
push: | ||
|
@@ -8,55 +8,27 @@ on: | |
types: | ||
- published | ||
|
||
|
||
concurrency: | ||
group: "${{ github.ref }}-${{ github.head_ref }}-${{ github.workflow }}" | ||
cancel-in-progress: true | ||
|
||
|
||
defaults: | ||
run: | ||
shell: bash -l {0} | ||
|
||
|
||
jobs: | ||
build_wheels: | ||
pypi_push: | ||
environment: deploy | ||
if: "github.repository == 'MDAnalysis/GridDataFormats'" | ||
name: Build pure Python wheel | ||
name: Build, upload and test pure Python wheels | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: setup_miniconda | ||
uses: conda-incubator/setup-miniconda@v2 | ||
with: | ||
python-version: 3.9 | ||
auto-update-conda: true | ||
add-pip-as-python-dependency: true | ||
architecture: x64 | ||
|
||
- name: install_deps | ||
run: | | ||
python -m pip install build | ||
|
||
- name: build | ||
run: | | ||
python -m build --sdist --wheel --outdir dist/ | ||
|
||
- name: publish_testpypi | ||
# Upload to testpypi on every tag | ||
- name: testpypi_deploy | ||
uses: MDAnalysis/pypi-deployment@main | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags/') | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
token: ${{ secrets.TEST_PYPI_API_TOKEN }} | ||
test_submission: true | ||
package_name: 'gridData' | ||
|
||
- name: publish_pypi | ||
- name: pypi_deploy | ||
uses: MDAnalysis/pypi-deployment@main | ||
if: github.event_name == 'release' && github.event.action == 'published' | ||
uses: pypa/gh-action-pypi-publish@release/v1 | ||
with: | ||
password: ${{ secrets.PYPI_API_TOKEN }} | ||
token: ${{ secrets.PYPI_API_TOKEN }} | ||
package_name: 'gridData' | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Same question above -- this variable is used for There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No it's used for the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ah wait I messed up somewhere There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. blergh what a pain - I'll have to change the action to account for this... funilly enough it didn't trip up mda_xdrlib at all. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Huh I guess I never fully realised pip doesn't care between There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I can't believe I keep spending the effort on typing underscores now 😂 better safe than sorry I guess |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Isn't this gridDataFormats?