Skip to content

Release

Release #218

Workflow file for this run

name: Release
on:
workflow_dispatch:
schedule:
- cron: "00 08 * * 1" # 08:00 UTC every Monday, which is 11:00 AM 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: 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 python
run: |
python3 setup.py sdist bdist_wheel
- 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 }}