v1.1.0 #9
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: "Release" | |
| on: # yamllint disable-line | |
| release: | |
| types: | |
| - "published" | |
| jobs: | |
| build: | |
| name: "Build package and store artifacts" | |
| # https://github.com/actions/runner-images/blob/main/images/ubuntu/Ubuntu2404-Readme.md | |
| runs-on: "ubuntu-24.04" | |
| steps: | |
| - uses: "actions/checkout@v4" | |
| - name: "Install uv" | |
| uses: "astral-sh/setup-uv@v5" | |
| with: | |
| version: "0.7.17" | |
| - name: "Build package" | |
| run: "uv build" | |
| - name: "Cache build artifacts" | |
| uses: "actions/upload-artifact@v4" | |
| with: | |
| name: "distfiles" | |
| path: "dist/" | |
| if-no-files-found: "error" | |
| publish-github: | |
| name: "Upload to GitHub Release" | |
| runs-on: "ubuntu-24.04" | |
| permissions: | |
| contents: "write" | |
| needs: "build" | |
| steps: | |
| - uses: "actions/checkout@v4" | |
| - uses: "actions/download-artifact@v4" | |
| with: | |
| name: "distfiles" | |
| path: "dist/" | |
| - run: "gh release upload ${{ github.event.release.tag_name }} dist/*.{tar.gz,whl}" | |
| env: | |
| GH_TOKEN: "${{ github.token }}" | |
| publish-pypi: | |
| name: "Upload to PyPI" | |
| runs-on: "ubuntu-24.04" | |
| environment: | |
| name: "pypi" | |
| url: "https://pypi.org/p/mkdocs-ansible-collection" | |
| permissions: | |
| id-token: "write" | |
| needs: "build" | |
| steps: | |
| - uses: "actions/download-artifact@v4" | |
| with: | |
| name: "distfiles" | |
| path: "dist/" | |
| - name: "Publish package distributions to PyPI" | |
| uses: "pypa/gh-action-pypi-publish@release/v1" |