name: Publish Release on: push: tags: - 'v*' jobs: publish: runs-on: docker timeout-minutes: 10 steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Install CI tools run: | . .env 2>/dev/null || true python3 -m pip install --break-system-packages "git+https://emil:${{ secrets.REPO_TOKEN }}@git.oblachno.oblachno.fyi/oblachno-oss/devx.git@master" python3 -m devx.tools.install_tools --tool git-cliff --tool tea - name: Install build tools run: python3 -m pip install --break-system-packages build twine - name: Configure tea login env: REPO_TOKEN: ${{ secrets.REPO_TOKEN }} run: | export PATH="$HOME/.local/bin:$PATH" tea login add --name grm --url "${{ github.server_url }}" --token "$REPO_TOKEN" || true tea login default grm || true - name: Build and publish release env: REPO_TOKEN: ${{ secrets.REPO_TOKEN }} PYPI_TOKEN: ${{ secrets.PYPI_TOKEN }} PYTHONPATH: src run: | export PATH="$HOME/.local/bin:$PATH" python3 -m devx.ci.publish \ "${{ github.ref_name }}" \ "${{ github.repository }}" - name: Notify on failure if: failure() env: REPO_TOKEN: ${{ secrets.REPO_TOKEN }} PYTHONPATH: src run: | export PATH="$HOME/.local/bin:$PATH" python3 -m devx.ci.notify_failure \ --repo "${{ github.repository }}" \ --run-id "${{ github.run_id }}" \ --workflow "publish" \ --commit "${{ github.sha }}"