-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
15 additions
and
10 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
|
@@ -89,6 +89,11 @@ jobs: | |
upload_testpypi: | ||
needs: [build_sdist, build_wheels] | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
environment: | ||
name: testpypi | ||
url: https://test.pypi.org/p/graph2mat | ||
permissions: | ||
id-token: write | ||
name: Publish package to TestPyPI | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
@@ -99,10 +104,8 @@ jobs: | |
|
||
- uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.TESTPYPI_TOKEN }} | ||
repository-url: https://test.pypi.org/legacy/ | ||
|
||
repository-url: https://test.pypi.org/legacy | ||
|
||
# Check that the testpypi installation works | ||
test_testpypi: | ||
needs: [upload_testpypi] | ||
|
@@ -127,22 +130,27 @@ jobs: | |
python-version: "3.8" | ||
|
||
# We should also wait for index to update on remote server | ||
- name: Install e3nn_matrix + dependencies | ||
- name: Install graph2mat + dependencies | ||
run: | | ||
sleep 10 | ||
version=${GITHUB_REF#refs/*/v} | ||
version=${version#refs/*/} | ||
python -m pip install --progress-bar=off --find-links dist --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ e3nn_matrix[test]==${version} | ||
python -m pip install --progress-bar=off --find-links dist --index-url https://test.pypi.org/simple/ --extra-index-url https://pypi.org/simple/ graph2mat[test]==${version} | ||
- name: Test the installation | ||
run: | | ||
pytest --pyargs e3nn_matrix | ||
pytest --pyargs graph2mat | ||
# Upload to PyPI on every tag | ||
upload_pypi: | ||
needs: [test_testpypi] | ||
name: Publish package to Pypi | ||
runs-on: ubuntu-latest | ||
environment: | ||
name: pypi | ||
url: https://pypi.org/p/graph2mat | ||
permissions: | ||
id-token: write | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
# alternatively, to publish when a GitHub Release is created, use the following rule: | ||
# if: github.event_name == 'release' && github.event.action == 'published' | ||
|
@@ -153,6 +161,3 @@ jobs: | |
path: dist | ||
|
||
- uses: pypa/[email protected] | ||
with: | ||
user: __token__ | ||
password: ${{ secrets.PYPI_TOKEN }} |