Publish Release #4
Workflow file for this run
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
| name: Publish Release | |
| on: | |
| release: | |
| types: | |
| - published | |
| env: | |
| AWS_DEFAULT_REGION: us-east-1 | |
| jobs: | |
| build-pypi: | |
| name: Build PyPi 📦 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: ⤵️ Check out code from GitHub (complete) | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: 🏗 Setup Python | |
| uses: finleyfamily/[email protected] | |
| with: | |
| poetry-plugins: poetry-dynamic-versioning[plugin] | |
| # Remove apt repos that are known to break from time to time | |
| # See https://github.com/actions/virtual-environments/issues/323 | |
| - name: Remove broken apt repos (ubuntu) | |
| run: | | |
| for apt_file in `grep -lr microsoft /etc/apt/sources.list.d/`; do sudo rm $apt_file; done | |
| - name: ⤵️ Install Dependencies (ubuntu) | |
| run: sudo apt-get update && sudo apt-get install sed -y | |
| - name: 👷 Build | |
| run: make build | |
| - name: ⤴️ Upload distribution artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: pypi-dist | |
| path: dist | |
| publish-pypi: | |
| name: Publish 📦 To PyPI | |
| needs: | |
| - build-pypi | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: pypi | |
| url: https://pypi.org/project/runway | |
| permissions: | |
| id-token: write | |
| steps: | |
| - name: ⤵️ Check out code from GitHub (complete) | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: ⤵️ Download distribution artifact | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: pypi-dist | |
| path: dist | |
| - name: 🏗 Setup Python | |
| uses: finleyfamily/[email protected] | |
| with: | |
| poetry-install: false | |
| poetry-plugins: poetry-dynamic-versioning[plugin] | |
| - name: 🚀 Publish Distribution 📦 to PyPI | |
| run: pypa/[email protected] | |
| notify-on-publish: | |
| name: Notify | |
| needs: | |
| - publish-pypi | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: ⤵️ Check out code from GitHub | |
| uses: actions/checkout@v4 | |
| - name: 🚀 Microsoft Teams Notification | |
| uses: skitionek/[email protected] # cspell:ignore skitionek | |
| if: always() | |
| with: | |
| webhook_url: ${{ secrets.MSTEAMS_WEBHOOK }} | |
| needs: ${{ toJson(needs) }} | |
| job: ${{ toJson(job) }} | |
| steps: ${{ toJson(steps) }} |