-
Notifications
You must be signed in to change notification settings - Fork 10
Automatic release #324
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
Merged
+154
−9
Merged
Automatic release #324
Changes from 20 commits
Commits
Show all changes
33 commits
Select commit
Hold shift + click to select a range
b64ea51
Rename test yml.
alicjapolanska db38287
Remove tests for debugging
alicjapolanska 159bb05
First draft of new build for automatic release
alicjapolanska fa31370
Update Python version and add more contributors
alicjapolanska d3514ea
Specify python version
alicjapolanska 4c680d6
Correct typo
alicjapolanska d7080b6
Change version control to dynamic controlled by release tags
alicjapolanska 9b70079
Add publishing to test pypi check
alicjapolanska 3aba255
Add verbose option
alicjapolanska f373f3c
Add automatic version tracking
alicjapolanska 7169f39
Add detuptools_scm config
alicjapolanska 10c8754
Correct typo and add to requirements
alicjapolanska 861c27c
Add options to setuptools_scm to remove local version
alicjapolanska 69da8e4
Remove ubuntu for testing purposes
alicjapolanska dc35f86
Test test pypi project name
alicjapolanska 35c21be
Go back to standard name
alicjapolanska 5496eab
Add back tests
alicjapolanska 70cd6c7
Add back ubuntu wheels
alicjapolanska 3074caf
Add back pypi
alicjapolanska 5ba5955
Remove test branch
alicjapolanska 33df149
Update .github/workflows/build.yml
alicjapolanska 85c3e92
Update .github/workflows/build.yml
alicjapolanska 9486e61
Remove tests for debugging
alicjapolanska 140a17b
Add source dist
alicjapolanska fed52eb
Merge branch 'automatic_release' of github.com:astro-informatics/harm…
alicjapolanska 177f372
Add back branch for testing
alicjapolanska d58d609
Add back tests
alicjapolanska 2018b61
Remove test branch
alicjapolanska acfef2f
Update .github/workflows/build.yml
alicjapolanska e90cd33
Require sdist for pypi upload
alicjapolanska c79f9b8
Add version file to gitignore
alicjapolanska 8ef1d9d
Add GW and SDDR papers
alicjapolanska 5b6adc1
Switch to new spelling
alicjapolanska File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,104 @@ | ||
| # Adapted from example at | ||
| # https://github.com/pypa/cibuildwheel/blob/0319c431dedc020eb/examples/github-deploy.yml | ||
| # | ||
| # Original license: | ||
| # | ||
| # This project is licensed under the 'BSD 2-clause license'. | ||
| # | ||
| # Copyright (c) 2017-2023, Joe Rickerby and contributors. All rights reserved. | ||
| # | ||
| # Redistribution and use in source and binary forms, with or without | ||
| # modification, are permitted provided that the following conditions are met: | ||
| # | ||
| # 1. Redistributions of source code must retain the above copyright notice, this | ||
| # list of conditions and the following disclaimer. | ||
| # | ||
| # 2. Redistributions in binary form must reproduce the above copyright notice, | ||
| # this list of conditions and the following disclaimer in the documentation | ||
| # and/or other materials provided with the distribution. | ||
| # | ||
| # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" | ||
| # AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE | ||
| # IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE | ||
| # DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE | ||
| # FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL | ||
| # DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR | ||
| # SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| # CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, | ||
| # OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE | ||
| # OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
|
|
||
| name: Build (and upload to PyPI for published releases) | ||
|
|
||
| on: | ||
| workflow_dispatch: | ||
| pull_request: | ||
| push: | ||
| branches: | ||
| - main | ||
| - automatic_release | ||
| release: | ||
| types: | ||
| - published | ||
|
|
||
| jobs: | ||
| build_wheels: | ||
| name: Build wheels on ${{ matrix.os }} | ||
| runs-on: ${{ matrix.os }} | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| os: [ubuntu-latest, macos-latest] | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v5.0.0 | ||
| with: | ||
| fetch-depth: 0 | ||
| fetch-tags: true | ||
| - name: Build wheels | ||
| uses: pypa/cibuildwheel@v3.1.4 | ||
| - uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: cibw-wheels-${{ matrix.os }}-${{ strategy.job-index }} | ||
| path: ./wheelhouse/*.whl | ||
alicjapolanska marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
|
||
| upload_test_pypi: | ||
| needs: [build_wheels] | ||
alicjapolanska marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| runs-on: ubuntu-latest | ||
| environment: test-pypi | ||
| permissions: | ||
| id-token: write | ||
| if: | | ||
| (github.event_name == 'release' && github.event.action == 'published') || | ||
| (github.event_name == 'push' && github.ref == 'refs/heads/main') | ||
| steps: | ||
| - uses: actions/download-artifact@v5 | ||
| with: | ||
| # Unpack all CIBW artifacts (wheels + sdist) into dist/ | ||
alicjapolanska marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| # pypa/gh-action-pypi-publish action uploads contents of dist/ unconditionally | ||
| pattern: cibw-* | ||
| path: dist | ||
| merge-multiple: true | ||
| # Try publishing to Test PyPI first - if there are issues this should | ||
| # cause job to fail before attempting to publish on PyPI itself | ||
| - name: Publish package distribution to Test PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
| with: | ||
| repository-url: https://test.pypi.org/legacy/ | ||
| verbose: true | ||
|
|
||
| upload_pypi: | ||
| needs: [build_wheels, upload_test_pypi] | ||
| runs-on: ubuntu-latest | ||
| environment: pypi | ||
| permissions: | ||
| id-token: write | ||
| if: github.event_name == 'release' && github.event.action == 'published' | ||
| steps: | ||
| - uses: actions/download-artifact@v5 | ||
| with: | ||
| pattern: cibw-* | ||
| path: dist | ||
| merge-multiple: true | ||
| - name: Publish package distribution to PyPI | ||
| uses: pypa/gh-action-pypi-publish@release/v1 | ||
File renamed without changes.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| @@ -1,3 +1,7 @@ | ||||||||||||||
| [build-system] | ||||||||||||||
| requires = ["setuptools", "wheel", "numpy", "Cython"] | ||||||||||||||
| build-backend = "setuptools.build_meta" | ||||||||||||||
| requires = ["setuptools", "setuptools-scm", "wheel", "numpy", "Cython"] | ||||||||||||||
| build-backend = "setuptools.build_meta" | ||||||||||||||
|
|
||||||||||||||
| [tool.setuptools_scm] | ||||||||||||||
| local_scheme = "no-local-version" | ||||||||||||||
| write_to = "harmonic/_version.py" | ||||||||||||||
|
||||||||||||||
| write_to = "harmonic/_version.py" | |
| write_to = "harmonic/_version.py" | |
| [tool.cibuildwheel] | |
| build = "cp311-* cp312-* cp313-*" | |
| skip = "*-musllinux_*" # Optional: skip musl builds if not needed |
alicjapolanska marked this conversation as resolved.
Show resolved
Hide resolved
alicjapolanska marked this conversation as resolved.
Show resolved
Hide resolved
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.