Test #11
Workflow file for this run
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
name: Publishing | |
on: | |
release: | |
workflow_dispatch: | |
jobs: | |
# First, run the standard test suite | |
test: | |
uses: ./.github/workflows/ci.yml | |
# Next, build the package wheel and source releases and add them to the release assets | |
build-wheel: | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build sdist | |
run: | | |
python -m pip install --upgrade build | |
python -m build | |
- uses: actions/upload-artifact@v4 | |
with: | |
path: dist/virtual_ecosystem* | |
- uses: softprops/action-gh-release@v1 | |
with: | |
files: dist/virtual_ecosystem* | |
# Now attempt to publish the package to the TestPyPI site, where the virtual_ecosystem | |
# project has been configured to allow trusted publishing from this repo and workflow. | |
publish-TestPyPI: | |
needs: build-wheel | |
name: Publish virtual_ecosystem to TestPyPI | |
runs-on: ubuntu-latest | |
permissions: | |
id-token: write | |
steps: | |
- name: Download sdist artifact | |
uses: actions/download-artifact@v4 | |
with: | |
name: artifact | |
path: dist | |
- name: Display structure of downloaded files | |
run: ls -R dist | |
- name: Publish package distributions to TestPyPI | |
uses: pypa/gh-action-pypi-publish@release/v1 | |
with: | |
repository-url: https://test.pypi.org/legacy/ | |
skip-existing: true | |
# # And if all goes well, in PyPI | |
# publish-PyPI: | |
# needs: publish-TestPyPI | |
# name: Publish MUSE to PyPI | |
# runs-on: ubuntu-latest | |
# permissions: | |
# id-token: write | |
# steps: | |
# - name: Download sdist artifact | |
# uses: actions/download-artifact@v4 | |
# with: | |
# name: artifact | |
# path: dist | |
# - name: Display structure of downloaded files | |
# run: ls -R dist | |
# - name: Publish package distributions to PyPI | |
# uses: pypa/gh-action-pypi-publish@release/v1 |