Release #302
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: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "00 15 * * 1" # 15:00 UTC every Monday, which is 6:00 PM Moscow time | |
| jobs: | |
| release: | |
| permissions: | |
| id-token: write | |
| contents: write | |
| runs-on: ubuntu-22.04 | |
| # disallows two or more release jobs to run in parallel | |
| concurrency: release | |
| steps: | |
| - uses: actions/checkout@v4.1.7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v4 | |
| with: | |
| # Install a specific version of uv. | |
| version: "0.5.8" | |
| enable-cache: true | |
| - name: Set up Python | |
| uses: actions/setup-python@v5.1.1 | |
| with: | |
| python-version: "3.12" | |
| - name: Configure python and git user | |
| run: | | |
| make deps | |
| git config --global user.name 'Yandex.Cloud Bot' | |
| git config --global user.email 'ycloud-bot@yandex.ru' | |
| - name: Python Semantic Release | |
| id: release | |
| uses: python-semantic-release/python-semantic-release@v9.8.8 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Build yandexcloud | |
| run: | | |
| make build | |
| - name: Publish package distributions to PyPI | |
| uses: pypa/gh-action-pypi-publish@v1.10.1 | |
| # NOTE: DO NOT wrap the conditional in ${{ }} as it will always evaluate to true. | |
| # See https://github.com/actions/runner/issues/1173 | |
| if: steps.release.outputs.released == 'true' | |
| with: | |
| password: ${{ secrets.PYPI_TOKEN }} | |
| - name: Publish package distributions to GitHub Releases | |
| uses: python-semantic-release/upload-to-gh-release@v9.8.8 | |
| if: steps.release.outputs.released == 'true' | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} |